About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconCompare Nested Cell & Struct Arrays Recursively (Scripts) Publisher's description

This package contains two functions CELLEQ and STRUCTEQ

This package contains two functions CELLEQ and STRUCTEQ which compare two cell arrays or two structures respectively. The cells/structs may internally contain more nested cell and struct arrays which are compared recursively.

Feature summary:
* Support for nested structures/cell arrays
* Return of full stack information on where the two cells/structs differ
* Control for comparison of Function handles within structs/cells
* Control for comparison of NaN properties

[iseq, info]= celleq(cell1, cell2, funh2string, ignorenan)
[iseq, info] = structeq(struct1, struct2, funh2string, ignorenan)

* iseq is true if all elements and subelements of the two cells or structs are identical
* info is a structure that contains a field "Reason" which gives you a text stack of why the difference occurred as well as a field "Where" which contains the indices of the element and subelement where the comparison failed.
* (optional) funh2string, if true, instructs function handle comparisons to return true if the string representations of the function handles are the same.
* (optional) ignorenan, if true, will return true for nan == nan. By default both properties are set to false

>> figure;
>> g = surf(peaks(50));
>> rotate3d
>> hg1 = handle2struct(gcf);
>> set(g,'XDataMode', 'manual');
>> hg2 = handle2struct(gcf);

>> [iseq, info] = structeq(hg1, hg2)
iseq =
info =
Reason: [1x137 char]
Where: '(1).properties(1).KeyPressFcn{1}'

>> [iseq, info] = structeq(hg1, hg2, true)
iseq =
info =
Reason: [1x188 char]
Where: '(1).children(1).children(1).properties(1).XDataMode

System Requirements:

MATLAB 7.9 (2009b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Compare Nested Cell & Struct Arrays Recursively (Scripts) Tags:

Click on a tag to find related softwares

Is Compare Nested Cell & Struct Arrays Recursively (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.