From the course: MATLAB 2018 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Save and print plots

Save and print plots - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

Save and print plots

- [Instructor] When you plot data in MATLAB, your script displays data in the figure window. In this movie, I will show you how to save a plot to a file and also print it if required. I've just run MATLAB and want to create a script, so I will go over to the Home tab and click the New Script button. I could've also pressed Control + N. Now I'm in the script editor, so I can define the script for my chart. The scenario I have in mind is for four stores with sales data, so I'll type storeid equal, and the store IDs will be values in the range from 147 to 150 incremented by one, so that's 147 colon 150. I don't want it to appear when the script is run, so I will suppress output with a semicolon and Enter. Now for the sales, I'll just type sales variable equal, and then in square brackets I'll have 150 comma 200 comma 125 comma 275. And right square bracket and a semicolon again to suppress and Enter. I want to make sure there are no existing figures that I'll be overwriting, so I will…

Contents