02 Matlab and Roots I

A1234 a 12 34 b5612 b 56 12 abmatrixmultiplication ans

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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.

Ask a homework question - tutors are online