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!

Plotting in Matlab

  1. Nov 12, 2016 #1
    1. The problem statement, all variables and given/known data
    (In Matlab) The variables w and z are related by w=cos(n*acos(z)) and z=cos(acos(w)/n) for n = 1,2,3,4 plot w vs z over domain (-1,1).

    2. Relevant equations
    w=cos(n*acos(z))
    z=cos(acos(w)/n)

    3. The attempt at a solution
    First I tried to substitute z into w and thought since I have a function which calls itself I'd use a recursive function but I don't have the initial conditions. Then I thought that since the domain is (-1,1) and z would be plotted on that axis I could make z equal to an array with endpoints -1 and 1 and then plug that array in for w. Then I'd simply plot(z, w). The coding part is not difficult it's just the thought process behind it.
     
  2. jcsd
  3. Nov 12, 2016 #2

    RUber

    User Avatar
    Homework Helper

    Normally, if you are asked to plot w vs. z over (-1, 1), you let one variable (say z) range from -1 to 1, and plot the other (w) as your dependent variable. In this case, I would try both ways.
    Overlaying the two plots should show where both relations can be true at the same time.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Plotting in Matlab
  1. Plot in matlab (Replies: 1)

  2. Matlab Plots (Replies: 2)

  3. Matlab, plot (Replies: 5)

  4. Matlab plots (Replies: 1)

  5. Matlab plotting (Replies: 6)

Loading...