alternatively you could use isequalwithnans instead of just isequal.

J.


On Tue, May 13, 2014 at 5:43 PM, Stéphane Adjemian <stephane.adjemian@univ-lemans.fr> wrote:

Hi Houtan,

For me this is not a bug, but we may want to change this behaviour. In
your example, isequal returns 0 because of the NaNs in ts3 and ts4: a
NaN is not equal to a NaN. We may instead compare only the non NaN
elements of the dseries objects...

Best,
Stéphane.

Houtan Bastani <houtanb@gmail.com> writes:

> The isequal statement should evaluate to true but doesn’t….
>
> ts1=dseries([1;2;3], '1999y', {'MyVar1'}, {'MyVar\_1'});
> ts2=dseries([4;5;6], '2000y', {'MyVar2'}, {'MyVar\_2'});
> ts3=[ts1 ts2]
> ts4=ts1.insert(ts2,2)
> isequal(ts3,ts4)

--
Stéphane Adjemian
https://stepan.ithaca.fr
Université du Maine, Gains and DynareTeam

_______________________________________________
Dev mailing list
Dev@dynare.org
https://www.dynare.org/cgi-bin/mailman/listinfo/dev




--
"You can never know everything", Lan said quietly, "and part of what you know is always wrong. Perhaps even the most important part. A portion of wisdom lies in knowing that. A portion of courage lies in going on anyway." Robert Jordan, Winter's Heart, Book IX of the Wheel of Time.

We have not succeeded in answering all of our problems. The answers we have found only serve to raise a whole set of new issues. In some ways we are as confused as ever, but we believe we are confused on a higher level and about more important things. (cited in Øksendal, 1985)