[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Set value to a custom significance. (no display)
From: |
Joris Spekreijse |
Subject: |
Set value to a custom significance. (no display) |
Date: |
Mon, 1 Mar 2010 07:30:54 -0800 (PST) |
Hello,
I am trying to set my values in a specific significance. Format() is not a
good solution, it is still fixed in a predefined length. I want my values to
be stored (into memory) let's say with a significance of 2. Octave should do
then the following:
:> a = 0.499 / 2
a = 0.25
:> a * 2
a = 0.5
and not
:> a * 2
a = 0.49900 (assuming that format is set to short)
Is there a way to do this in Octave?
I tried something with
:> a = 0.499;
:> clear b;
:> b = printf("%0.2f", a);
0.50b = 4
b has then the value of 4.
--
View this message in context:
http://old.nabble.com/Set-value-to-a-custom-significance.-%28no-display%29-tp27745022p27745022.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Set value to a custom significance. (no display),
Joris Spekreijse <=