Exploring MATLAB Plotting: Line, Color, and Marker Specifications with a Quadratic Function Graph

Explores MATLAB plotting features.

Ryan Scott
Contributor
4.3
55
3 days ago
Preview (2 of 3)
Sign in to access the full document!
Exploring MATLAB Plotting: Line, Color, and Marker Specifications with a
Quadratic Function Graph
1. Question one.
Script to plot y=x^2.given x= x = [1:0.05:3].
%Script to plot a graph y=x^2.given x= x = [1:0.05:3].
x = [1:0.05:3]
y=x.^2
plot (x,y,'r')
2. Question two.
a. Matlab Line Specification.
'--' Dashed line
':' Dotted line
'-.' Dashed-dot line
b. Matlab Color Specification.
' r ' - Red
' g ' -Green
' c ' -Cyan
' m' -magenta
' y' -yellow
' k' -black
' w ' white
c. Matlab Marker Specifiers.
'+' -plus sign
'o' -circle
'*' -asterisk
'.' -point
'x' -cross
'square' or 's' -square
'diamond' or 'd' -Diamond
3. Question Three.
%Script to plot a graph y=x^2.given x= x = [1:0.05:3].
x = [1:0.05:3];
y=x.^2;
plot (x,y,'r')
Preview Mode

Sign in to access the full document!

100%

Study Now!

XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat

Document Details

Subject
Mathematics

Related Documents

View all