Possible Duplicate:
how to compare array with matlab
Here's an example of what I'm looking for:
[a,b,c,d] = getVal(x);
This will give:
a =
a
b=
0
c =
10
d =
[]
And I have:
expected = {'a','0','10',[]};
How could I make the comparison between [a,b,c,d]
and expected ?
When I call only getVal(x)
, it gives me only the first value and when I write:
[a,b,c,d] = getVal(x)
Then I got all values in the log. Why isn't this the case when I call
getVal(x)
?
For comparison I tried:
isequal([a,b,c,d], expected {1:end})
but it doesn't work, any idea how to solve my problem?