When you plot data in MATLAB, your script displays data in the figure window. In this video, learn how to save a plot as a file and print it if required.
- [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 use the clf command,…and that clears the figure area.…
Author
Released
8/28/2018- Defining variables and contains
- Exploring operators
- Summarizing with built-in functions
- Generating random numbers
- Defining vectors and matrices
- Accepting input in scripts
- Writing and reading data from external files
- Creating custom functions
- Using conditional logic
- Repeating operations with loops
- Working with text strings
- Plotting data and function output
- Formatting, saving, and printing plots
- Using statistical and matrix functions
Skill Level Intermediate
Duration
Views
Related Courses
-
SAS Programming for R Users, Part 2
with Jordan Bakerman2h 2m Intermediate
-
Introduction
-
What you should know1m 6s
-
1. Starting Out with MATLAB 2018
-
Define ranges of values4m 45s
-
Generate random numbers5m 35s
-
Get help in MATLAB4m 11s
-
2. Managing Vectors and Matrices
-
Define vectors and matrices5m 56s
-
-
3. Creating MATLAB Scripts
-
Create a MATLAB script7m 33s
-
-
4. Conditional Logic and Loops
-
Use is statements3m 45s
-
5. Managing Strings and Data Structures
-
Define string variables2m 9s
-
Concatenate strings3m 12s
-
Convert strings to numbers4m 22s
-
-
6. Performing Advanced Plotting and Statistical Analysis
-
Create other plot types10m 11s
-
Format plot elements4m 56s
-
Save and print plots3m 18s
-
Conclusion
-
Further information1m 6s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Save and print plots