[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: graphing equations
From: |
Przemek Klosowski |
Subject: |
Re: graphing equations |
Date: |
Wed, 12 Nov 2003 13:44:35 -0500 (EST) |
> to plot three planes on the same graph. for example
> 2x+y+z=4 x+y+z=2 3x-y-z=2 so students can see the point of intersection.
Since Octave is a numerical environment, it assumes that you want to plot
numerical objects (arrays of data). Plotting functions, then, requires
manually preparing the 'support' arrays and calculating the value arrays:
x = 0:.1:pi
plot(sin(x))
or plot(cos(0:.1:pi)
this gets even longer for 2-d support:
[x,y]=meshdom(0:.1:pi, 0:.1:pi)
mesh(x,y,sin(x.*y))
Using gnuplot directly, you can simplify it a little bit because gnuplot
can plot functions: you can just say
splot 4-2*x-y,2-x-y,3*x-y+2
and it will plot what you need (the default range is [-10:10]x[-10:10])
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------