View Single Post
cupcake
cupcake is offline
#1
Oct12-09, 12:15 AM
P: 76
1. The problem statement, all variables and given/known data

write down the scilab code that will plot the direction field of dy/dx = x^2 + y^2 -1 on a suitably large rectangle. you have to adjust the interval values of x and y so as to get a clear picture.


2. Relevant equations

dy/dx = x^2 + y^2 -1

3. The attempt at a solution

I have been trying to do this question, but I'm not sure whether I did it correctly or not, since I have to learn scilab with my own. so, here's my code...

-->deff('[xdot]=f(x,y)', 'xdot=[x(1).^2; y(1).^2-1]')
-->fchamp(f, 1, -4:0.4:4, -4:0.4:4, 1.5)
-->mtlb_axis ( [-4 4 -4 4] )
-->xlabel('x')
-->ylabel('y')

please correct me if I'm wrong..
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language