File Exchange Pick of the Week

Our best user submissions

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: 'https://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.




Published with MATLAB® 7.9

|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。