Matlab Plot

  • Thread starter lukus09
  • Start date
  • #1
32
0
How do i plot an output response curve when input unit steps are (undamped natural frequency is normalised to 1):

damping ration = 0, 0.1, 0.4,0.6,0.8,0.9 1 and 2

1) how do i plot a 2d plot for all curves on same graph. Time scale 0 - 10, steps of 0.2 seconds.
2) How do i make use of a 'for loop' to generate step response for the damping ratios,
3) How do i produce an m file to obtain response.
4) how can i produce a 3d plot
5)how do i produce a Matlab program to get rise time, peak time, settling time and max overshoot of the 2nd order system [for equation 10/ 2s^2 + 4s +15]
 

Answers and Replies

  • #2
MATLABdude
Science Advisor
1,655
4
From your PM, I'd recommend that you ask your prof for materials / a lecture / lab on MATLAB, especially if you [collectively you, meaning you and your classmates] have never used it before. If learning MATLAB by yourself *is* part of this course, then you should probably read the textbook (if provided) or go through some of the http://www.mathworks.com/academia/student_center/tutorials/launchpad.html" [Broken], and/or go through the following thread:
https://www.physicsforums.com/showthread.php?t=296209


1) Assuming you have data for each of the graphs you wish to plot:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.html


3) An m-file allows you to automate a sequence of commands. Instead of typing out 20 commands each and every time you want to do something, you type out the 20 commands in the m-file, and just type the name of the m-file (assuming it's in the current directory) to execute these commands. You can start a new m-file by going File > New m file (or something similar). Getting started with m scripts:
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f7-38085.html#f7-60588 [Broken]


2) The 'for' loop in MATLAB:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/for.html


4) Producing a (basic) 3d plot:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot3.html

Note that you can generate various 3D surface plots using, for instance, mesh and surf:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mesh.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/surf.html


5) Take a look at the following Wikibook on using MATLAB for Control Systems:
http://en.wikibooks.org/wiki/Control_Systems/MATLAB
 
Last edited by a moderator:

Related Threads on Matlab Plot

  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
1
Views
864
  • Last Post
Replies
6
Views
649
  • Last Post
Replies
10
Views
10K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
550
  • Last Post
Replies
5
Views
23K
  • Last Post
Replies
4
Views
558
Top