Your SlideShare is downloading. ×
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Plotting graphs in_matlab
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Plotting graphs in_matlab

301

Published on

Workshop on MATLAB at the Department of Computer Science, Poona College, Pune

Workshop on MATLAB at the Department of Computer Science, Poona College, Pune

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
301
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 10/23/2012 40 30 20 10 9 10 8 0 1 7 0.5 1 0 0.5 0 6 -0.5 -0.5 -1 -1 Plotting Graphs in MATLAB 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10DOES - PC
  • 2. Plots: 2D & 3D: 2D Plot: Plot(Y) Plot(Y) plots the columns of Y versus their index if Y is a real number. Plot(X,Y) If Y is complex, plot(Y) is equivalent to plot(real(Y),imag(Y)).DOES - PC
  • 3. Examples:>> x=0:1:10x= 0 1 2 3 4 5 6 7 8 9 10>> y = 0:10:100y= 0 10 20 30 40 50 60 70 80 90 100
  • 4. >> plot(x,y)>> plot(x)>> plot(y) 100 90 80 70 60 50 40 30 20 10 0 0 1 2 3 4 5 6 7 8 9 10
  • 5. 3D Plot: plot3 The plot3 function displays a three-dimensional plot of a set of data points. >> t = 0:pi/50:10*pi; 40 >> plot3(sin(t),cos(t),t) 30 20 10 0 1 0.5 1 0 0.5 0 -0.5 -0.5 -1 -1DOES - PC
  • 6. Pie chart (2D): pie(X) 20% 20% pie(X,explode)>> x = [2 2 2 2 2];>> explode = [1 1 1 1 1];>> pie(x,explode) 20% 20% 20%
  • 7. Pie chart (3D):>> x = [1 3 0.5 2.5 2];>> % Create a 3D pie chart using the pie3 function>> figure;>> explode = [0 1 0 0 0]; 22%>> pie3(x, explode); 11% 28% 33% 6%
  • 8. Graph Functions:• plot linear plot• stem discrete plot• grid add grid lines• xlabel add X-axis label• ylabel add Y-axis label• title add graph title• subplot divide figure window• figure create new figure window• pause wait for user response
  • 9. Types of Graphs:(Use MATLAB help Window)axisBar3GridLineLineSpecLoglogPlotSemilogxSemilogySubplot........

×