Posts

Example of matlab

Matlab program 00:04 show you how to create and run a basic MATLAB program so if we open up MATLAB 00:11 we'll see a big panel in the middle this is called the command window the command 00:16 window is used to execute commands one by one I'll show you what I mean we can 00:21 create a vector X that goes from 1 to 10 and when I hit enter this vector is 00:27 created in our workspace or I can create a vector Y which is equal to the square 00:33 root of x and when I hit enter this vector is also created or I can even 00:39 create a plot from these two vectors and when I hit enter this figure pops up on 00:45 the front of my screen so as we can see the command window is great if you want 00:50 to execute commands line by line but what if you want to execute multiple 00:55 commands at a time well you can do this by creating a live script let's close 01:02 out of this figure and I'll show you two ways to accomplish this the first way is 01:07 to click new and then live scrip