I studied electrical engineering with a specialisation in acoustics / electroacoustics / signal processing. Currently I am employed by a company which develops and manufactures telecom loudspeakers (microspeakers). I'm doing acoustics research and development there, including electroacoustic simulations and software development.
My private interests include dancing Salsa and developing HighEnd loudspeakers.
I came up with the same "hack" as Barry - this now was already a few years ago... From a programming point of view this is very unaesthetic but it does what it is supposed to do.
I posted it on file exchange as contribution 20972 "copymyobj".
Using this hack is more powerful than any other implementation of a generic copy because it deep-copies also dynamically added properties etc. This is due to reasons which are described by Bobby some 2 postings above.
More than once I complained at The Mathworks that there is no generic function for doing deep copies of classes inheriting from handles - obviously now there is a chance that they are investigating this issue :-)
This file is great, saves lots of work.
But in order to test the buttons result more easily, I replaced all occurrences of the variable 'button' with the new variable name 'canceled' and modified some code lines:
line 93: <button = ;> replaced by <canceled=true;>
line 387: <button = 'OK';> replaced by <canceled=false;>
line 424: <button = 'cancel';> replaced by <canceled = true;>
Now I can call the dialogue ([settings,canceled]=settingsdlg(...)) and then just test with a simple if ~canceled, code, end instead using strcmp for that.
THANKS FOR THIS FILE!
Solve my problem puzzled me for a long time, because I can't print *.jpeg files as the figures, and I used to copy *.fig files to another Windows computer to finish printing wanted picutres.
When I get this function, Matlab under Linux is becoming more amazing!
Thank you very much!
I realized that comment in the function is not possible to extract by this filter even with "%>"
And function output parameter does not reveal in the documents also, if using a "..." for line break in the function name, the filter cannot parse it correctly.