Very nice work!
But I have a question. I want to add this function into a GUI and I want, everytime I press a specific pushbutton, to store the exact timestamp (so basically the time I push the button) to a buffer. Any help as to how to do that? I know I have to add code to the callback function of the pushbutton, but I am not sure exactly what to write. Thank you in advance.
I would recommend changing the line
er = norm(s1-s2);
er = norm(s1./s2-1);
If I am comparing a struct, simply containing parameter values, it makes sense to use the relative error.
E.g. comparing 5e-12 with 4e-12 should not be a tolerance match.
23 Nov 2013
Compares two structured variables recursively and notes where the two structures are different.