Matthew's Octave Assignment: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
(Created page with 'I found that octave opperates in Radian measurements. cos(53)= -0.91828 (radiam) cos(53)= 0.60181 (degree) Normal calculations that can be done on a calculator can be done …')
 
No edit summary
 
Line 13: Line 13:
plot(x, y, '.')
plot(x, y, '.')


while choosing the type of lines that you want based on what is in the third
While choosing the type of lines that you want based on what is in the third
column of the plot function.
column of the plot function.
'.' = dots
'.' = dots

Latest revision as of 12:37, 3 October 2010

I found that octave opperates in Radian measurements.

cos(53)= -0.91828 (radiam)
cos(53)= 0.60181  (degree)

Normal calculations that can be done on a calculator can be done in Octave.

In order to set up a plot, you must define every variable, and then say plot that variable vs. another variable.

x = linspace(0, 2*pi, 100);
y = sin(x);
plot(x, y, '.')

While choosing the type of lines that you want based on what is in the third column of the plot function.

 '.' = dots
 '@' = crosses
 so on....