Stuart’s MATLAB Videos

Watch and Learn

Managing code in MATLAB: Scripts 4

Posted by Doug Hull,

This is the first series of MATLAB video tutorials that are an attempt to systematically make videos for a “technology trees” for using MATLAB. This first tree covers the various kinds of MATLAB files you might write. The tree shows you the order you should watch them because some rely on skills you need to learn from earlier videos, but some do not.

Script Function 1in1out MinNout VarArg Cell mode Markup Interactive Driver script Sub function Nested

You can see that understanding what a script is in MATLAB is the fundamental skill needed to understand functions, subfunctions, etc…

This video will show how and why you write script files in MATLAB.

Stuart did a video that covers this material in a similar but different way.

4 CommentsOldest to Newest

dhull replied on : 2 of 4
@pierre, I thought it beyond the scope of this blog. I tend towards introductory material. Doug
Rodrigo replied on : 4 of 4
Hi Doug, I have found your posts very beneficial in the past so I want to start by commending you on your great job. Second, when you mentioned we can use any text editor you reminded me that sometimes I edit my code using pspad (great open source text editor for windows). I use it when I don't have internet available and therefore cannot reach my university matlab license to use the actual matlab editor. I do prefer the matlab editor because of course it has all these matlab-specific and useful features, but there is one thing that pspad has that I would very much like to see in matlab: When I open a parenthesis ( I immediately get the closing parenthesis and the cursor is right between them waiting for me to type. So by typing ( i get (|) That was supposed to be a blinking cursor between the parenthesis. And this idea of course extends to vector/matrices definitions: [] and arrays {} Since I will probably be using matlab the rest of my life I am hoping matlab can add that feature to their amazing array of features. I feel confident a great amount of matlab users will fall in love with it. Since I don't know who to address this suggestion to, I thought I would ask you about it. Thanks again Doug. Sincerely, Rodrigo.