Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to compare matlab cells or structs [duplicate]

Possible Duplicate:
Octave/MATLAB: How to compare structs for equality?

is there a simple comparison function for matlab cell or struct objects? using '==' doesn't seem to work :(

like image 900
urso Avatar asked Feb 24 '11 18:02

urso


People also ask

What does double == mean in MATLAB?

Description. double is the default numeric data type (class) in MATLAB®, providing sufficient precision for most computational tasks. Numeric variables are automatically stored as 64-bit (8-byte) double-precision floating-point values. For example: x = 10; whos x.

How do you check if two cell arrays are equal in MATLAB?

tf = isequal( A,B ) returns logical 1 ( true ) if A and B are equivalent; otherwise, it returns logical 0 ( false ). See the Input Arguments section for a definition of equivalence for each data type.

How do I compare two workspaces in MATLAB?

MATLAB® desktop — Go to the Home tab and, in the File section, click Compare. Click the Browse to select File or Folder button to select items to compare, or drag and drop files from your file browser into the First file or folder or Second file or folder fields.


1 Answers

If you want to know if two cell arrays or struct objects are exactly equal you could always use isequaln.

like image 124
b3. Avatar answered Oct 03 '22 21:10

b3.