File Exchange Pick of the Week

July 31st, 2009

STRUCTDLG (Part 1 of 2)

Bob's pick this week is STRUCTDLG by Marco Cococcioni.

This is a nifty data editing tool. Suppose you have a structure with a few named fields in your MATLAB workspace.

myStruct.Submission = 'Time index';
myStruct.Author = 'Bob';
myStruct.Address = 'http://wwww.mathworks.com/matlabcentral/fileexchange/21891'
myStruct = 
        Author: 'Bob'
    Submission: 'Time index'
       Address: 'http://wwww.mathworks.com/matlabcentral/fileexchange/21891'

Notice the address contains a typo. I could correct it by modifying the code but suppose the data was loaded from a file, or typed by an end user (possibly you). What structdlg provides is a simple tool for editing the values of structure fields.

myStruct = structdlg(myStruct);

myStruct
myStruct = 
        Author: 'Bob'
    Submission: 'Time index'
       Address: 'http://www.mathworks.com/matlabcentral/fileexchange/21891'

If you build programs in MATLAB for others, this could be an instant and effective plug-in for your applications.

I also want to thank S C for his 07 Nov 2005 rating comment.

"This utility is very useful and is very simple and intuitive.

When a more powerful structdlg utility is needed I could be preferable to look to the structdlg version provided by Alon Fishbach (you can find it in this forum, also)."

Indeed! Next week I will highlight Alon's submission so be sure to check back. Meanwhile, don't be shy about sharing your comments.


Get the MATLAB code

Published with MATLAB® 7.9

One Response to “STRUCTDLG (Part 1 of 2)”

  1. Bob replied on :

    Adding convenience link to part 2.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Zach: Hi Doug and Les, I didn’t have a lot of time to mess with this, but I did find a work-around. I plotted...
  • hamed: k
  • Les: @Zach This isn’t exactly what you are looking for but at least it puts all three parameters on the same...
  • Zach: Thanks for your suggestions Doug. I’ll give that a shot and see what happens. I’ve seen many of...
  • Doug: @Zach, I would say to use plotYYY, because that is close to what you want, but using depth as Y makes sense....
  • Doug: @Teja, I think this will work: http://www.mathworks .com/access/helpdesk /help/techdoc/ref...
  • Gify: merry christmas :) nice christmas tree! Regards, Janet Gify
  • Teja: Dear Doug Is there anyway to plot a surface from nonuniform data without meshgrid and griddata? Basically i...
  • Zach: I’m working with geophysical data, so I’d like to produce a depth profile. The y-axis would be...
  • Doug: @Ashok First, please do not use variable names that are MATLAB commands (std and mean). Second, p(j) should be...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.