• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Plotting in Matlab

  • Thread starter lee403
  • Start date
16
1
1. Homework Statement
(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. Homework 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.
 

RUber

Homework Helper
1,687
344
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.
 

Want to reply to this thread?

"Plotting in Matlab" You must log in or register to reply here.

Related Threads for: Plotting in Matlab

  • Posted
Replies
1
Views
2K
  • Posted
Replies
5
Views
23K
  • Posted
Replies
3
Views
2K
  • Posted
Replies
5
Views
1K
  • Posted
Replies
1
Views
716

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top