Thanks John. I understand what you are getting at but I do think that there can be a good approach which should gives a unique answer in almost any case (filling a nan area from the outside in i.e.). I disagree, that a random pick (from adjacent values with same occurence) would be unsatisfactory. I actually think it's the right thing to do if you don't have more information, since all it is is noise.
What kind of assumptions can be made of course primarily depends on the specific problem/dataset.
nice function, thanks.
I could use a method which replaces a nan by the most common, discrete (!) neighbor value. I can think of various applications for that.
For instance: I have an array containing blobs with n discrete values [1,2,3,4...n] with some data missing at the intersections of those "areas". It makes no sense to fill the nan-gaps with an interpolated value.
I think this wouldn't be too hard to add. Either immediate neighbor analysis or even a defined distance weighting, bu the fill should be the exact value of one of the neighbors.
For all of you having trouble with
srm_boundarygradient or any other of the mex-files: you are probably running Matlab in x64-mode and therefore Matlab will not run the included 32bit files.
On Windows the easiest will be to install a gcc-toolchain since compilation with MSVC seems to fail. A nice how-to has been posted here: http://stackoverflow.com/questions/8552580/using-gccmingw-as-matlabs-mex-compiler
Once I changed the toolchain, mex64-files were successfully created and the code works flawlessly. Thank you!
10 Dec 2013
Like subplot, but easier, and WYSIWYG export to file. Also fixes dashed/dotted lines in export.
Hi Joel, thanks for the comments.
In answer, I don't generally use panel like that (rather, I mod the script and run it from scratch again), but it can be done if you prefer messing around at the command line. As I say, this is relatively untested because I don't use it, so ymmv.
I think if you delete a child panel, everything behaves, and you can call delete on an array of panels. So, in your example, try:
delete(p(1).children); % p(1).reset()