Rank: 19869 based on 0 downloads (last 30 days) and 0 file submitted



Personal Profile:


Watch this Author's files


Comments and Ratings by Jeremy View all
Updated File Comments Rating
03 Aug 2010 Structure Tree Prints to a file the fields of a structure in tree format. Author: Juan Vega

Suggestion: I modified the input to allow no filename to be given in which case fid is set to 1 (standard output). Nice work though, was giving myself a headache trying to do the recursion through the levels properly!

22 Jan 2009 CATSTRUCT Concatenate/merge structures (v4.0, dec 2013). Author: Jos (10584)

Nice work, just one comment:
I just noticed that when merging two structures, the fact that any dissimilar fields in the FIRST level are merged, but dissimilarities in subsequent levels are lost: e.g.

s1.a = 1;
s1.b = 2;

s2.a = 101;

s3 = catstruct(s1,s2) gives s3.a = 101, s3.b = 2.

s1.A.a = 1;
s1.A.b = 2;

s2.A.a = 101;

gives s3.A = a : 101.
i.e. we lose field b. I kind of understand the logic, i.e. that it is now field A that is being overwritten by a new field A, so that a depth=1 merge has occurred, but for anyone looking to do a true merge-style operation, this means needing to loop though each level... any plans to change this?

Contact us