0% found this document useful (0 votes)
63 views

Basic MATLAB Plotting 1

This document provides an overview of MATLAB and how it will be used in the course. MATLAB stands for matrix laboratory and is a powerful tool for computation, visualization, and programming in engineering and science. It contains predefined functions organized into toolboxes and allows the user to write custom MATLAB programs (M-files) by typing commands sequentially. The document demonstrates how to write a simple MATLAB program to perform calculations and display/plot results. It provides examples of basic MATLAB code to calculate and plot an equation, as well as how to change the appearance of plotted lines using line specifiers.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Basic MATLAB Plotting 1

This document provides an overview of MATLAB and how it will be used in the course. MATLAB stands for matrix laboratory and is a powerful tool for computation, visualization, and programming in engineering and science. It contains predefined functions organized into toolboxes and allows the user to write custom MATLAB programs (M-files) by typing commands sequentially. The document demonstrates how to write a simple MATLAB program to perform calculations and display/plot results. It provides examples of basic MATLAB code to calculate and plot an equation, as well as how to change the appearance of plotted lines using line specifiers.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

MATLAB What Is It ?

Name

is from matrix laboratory


Powerful tool for

Computation and visualization of engineering and


science mathematics
Communication of ideas
Programming:
Built-in

editor, debugger, and help


Many predefined functions (grouped in toolboxes)
Interpreted or compiled programs

How Do We Want To Use MATLAB


In This Course?

Write a Simple MATLAB Program to


Do the Following:
- Perform Particular Calculations
-

Display/Plot Particular Results for Interpretation

Creating Your Own Program


Script (m-file) Concept

M-file is a collection of MATLAB commands

File format: Name.m


Commands are executed one by one sequentially

Can be re-executed
Is easily changed/modified or e-mailed to someone

File is executed by typing its name (without .m)


Results appear in the command window (or use ; )

Can be created using any text editor, but is most


easily developed in MATLAB Editor Window

Boot Up Default MATLAB Window

Opens Editor Window


to create new program

Help menu provides


answers to most questions

In this window:
- type & edit commands
- test & run program
- save work when
finished

Demo MATLAB Code


Calculate & Plot Equation: y=2x+30x 2-2x3

Dot needed for elementby-element operation

Semicolon used to suppress output to


Command Window commonly desired

Plotting Line Specifiers

Line Specifiers Change the Look


Especially Handy When Plotting
Several Lines on Same Graph
Use Help Menu to Find Out More

You might also like