Posts

Showing posts with the label FARJOUN:

2. The Command Prompt

YOSSI FARJOUN: This is Dr. MATLAB, lecture two, The Command Prompt. If you're like me, you'll find yourself on the command line a lot when you're working MATLAB, so it's important to know how to get around on the command prompt. The first thing I want to show you is how to use the arrows. Say I want to plot something. So I want to plot sin of 2x between 0 and pi on 200 points. This is what I type. Of course, I typed it with a typo. I forgot to put the multiplication sign between the 2 and the x up here. So we've already seen in the previous lecture that instead of typing the whole thing, I press the up command, the up arrow, which brings up the previous command. And then with the left arrow, I can place the cursor where I need it to be and insert the asterisk. I forgot to put the semi-colon, so again, I press up at the semi-colon and now I have what I wanted. Now I plot x and y and I get my plot. I'll put it into the window. Here it is. Great. Now ...