1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[help] using scilab to plot the direction fiel of ode

  1. Oct 12, 2009 #1
    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..
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: [help] using scilab to plot the direction fiel of ode
Loading...