MATLAB: Matrix, struct, array, comparison

struct

I have two struct variable: primo and secondo
>> primo
primo =
Y: {1x8 cell}
primo.Y
ans =
Columns 1 through 4
[1000x9 double] [1000x9 double] [1000x9 double] [1000x9 double]
Columns 5 through 8
[1000x9 double] [1000x9 double] [1000x9 double] [1000x9 double]
secondo =
Y: {1x8 cell}
>> secondo.Y
ans =
Columns 1 through 4
[1000x9 double] [1000x9 double] [1000x9 double] [1000x9 double]
Columns 5 through 8
[1000x9 double] [1000x9 double] [1000x9 double] [1000x9 double]
Inside of these two variables, there should be the same numerical values. But I do not know if it is really so. How can I be sure that the numerical value inside the matrix [1000x9double] are exactly the same for each matrix? Thanks.

Best Answer

Francesco, loop through the eight cells and use isequal to compare the matrices.