From workspace To workspace problem :/

From workspace To workspace problem :/

Post by Vinc » Tue, 08 Feb 2005 02:00:09


Trying to read from workspace variables and writing it to workspace
again I can't manage to have a correct time vector. I'm using
Fixed-Step (0.015), ode1, Single-Tasking simulation parameters.

time = [0:0.015:1.5]';
var(1:101,1) = 1;

FromWorkSpaceBlock(Data=[time,var];Sample Time = 0.015, unchecked
Interpolate Data, HoldingFinalValue)

->

ToWorkSpaceBlock
(VariableName = var2 ; LimitDataPointsToLast = inf ; Decimation = 1 ;
SampleTime = -1 ; SaveFormat = StructureWithTime)

Time-var2.time is different from 0 (~10^-15 or something) for some
values !!?
I can't understand why it works with other time steps but not 0.015
:/

Tx in advance
 
 
 

From workspace To workspace problem :/

Post by Steven Lor » Tue, 08 Feb 2005 23:27:53


You can't exactly represent 0.015 as an IEEE double-precision value. See
question 5.1 in the newsgroup FAQ:

http://www.yqcomputer.com/ ~pwb/cssm/

and this document on our website:

http://www.yqcomputer.com/

as well as the excellent Cleve's Corner article referenced in each of the
above documents.

--
Steve Lord
XXXX@XXXXX.COM