This week’s guest pick of the week comes from Brett Shoelson of CSSM fame and one of the newer Language of Technical Computing Applications Engineers here at The Mathworks. Applications Engineers present a lot of live seminars, maybe you can meet Brett at his next event and ask him some really tough questions!
Let’s say that you wanted to create a linearly spaced vector of elements ranging from scalar x1 to scalar x2; MATLAB’s own linspace.m function was built for that purpose, and makes it a trivial problem. But what if instead you wanted to step from vector X1 to (same-sized) vector X2 in a given number of steps? Or more dauntingly, consider the task of uniformly incrementing the elements of N-dimensional matrix M1 to the equal-sized matrix M2 in a specified number of steps. Certainly there are several ways to approach the problem, but none is particularly easy. Until, that is, you download Duane Hanselman’s linspacen, which, with some very nice code, makes short work of the problem. Duane has also provided the functionality to step logarithmically in N dimensions, expanding the functionality of MATLAB’s logspace function. The pair, linspacen and logspacen, together comprise this week’s Pick of the Week.
Hi Doug, I’m a MATLAB programmer, I was wondering if I can have a weblog on MATWORKS website (do I have to be a MATHWORKS employee to get a weblog here????)
The MathWorks blogs are one of the perks of being a MathWorker. Some people use their File Exchange profiles to link to their blogs. Also, if you have ideas for code that should be used for Pick of the week, please let me know and I will check it out (even if it is your own). I can credit you for the find.
Leave a Reply
About
Brett & Jiro share their favorite user-contributed submissions from the File Exchange.
Hi Doug, I’m a MATLAB programmer, I was wondering if I can have a weblog on MATWORKS website (do I have to be a MATHWORKS employee to get a weblog here????)
Have a nice day
-Siamak
http://www.pitchup.com
The MathWorks blogs are one of the perks of being a MathWorker. Some people use their File Exchange profiles to link to their blogs. Also, if you have ideas for code that should be used for Pick of the week, please let me know and I will check it out (even if it is your own). I can credit you for the find.