This preview shows page 1. Sign up to view the full content.
Unformatted text preview: e.
See p66 of Chapra (2nd ed), p74 of Chapra (3rd ed), or p470 of Gilat 5 1/10/2013 Creating a Plot
Suppose that we would like a plot showing the area of the room vs its width.
>> figure(1); % the plot will be “Fig 1”
>> width = linspace(0, 10, 50);
>> area = width .* (width + 4);
>> plot (width, area);
>> xlabel ('Room width (metres)');
>> ylabel ('Room area (square metres)');
>> grid on;
width is a vector containing 50 equally spaced values between 0 and 10
area is also a 50 element vector. It is created by performing operations upon vector width. The dot indicates “element by element ” multiplication.
The plot command creates an x‐y plot using the values in width as the x values and t...
View
Full
Document
This note was uploaded on 03/30/2013 for the course ECOR 2606 taught by Professor Goheen during the Spring '10 term at Carleton CA.
 Spring '10
 Goheen

Click to edit the document details