A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 3 years ago
can someone help me write a program for MATLAB for cos(theta)
SO FAR I HAVE:
clc
clear
theta=0:pi:4*pi;
plot(theta,cos(theta))
xlabel('theta')
ylabel('cos(theta)')
grid off
for some reason it's display the graph not 'curve' and it's not display the x values a 0,pi,2pi,3pi,4pi...
someone help please :/
anonymous
 3 years ago
can someone help me write a program for MATLAB for cos(theta) SO FAR I HAVE: clc clear theta=0:pi:4*pi; plot(theta,cos(theta)) xlabel('theta') ylabel('cos(theta)') grid off for some reason it's display the graph not 'curve' and it's not display the x values a 0,pi,2pi,3pi,4pi... someone help please :/

This Question is Closed

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0for some reason it's display the graph not 'curve' and it's not display the x values a 0,pi,2pi,3pi,4pi... ^ what do you mean?

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0give me a sec and I'll upload the problem exactly.. it has a picture..

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0Write a MATLAB program that generates the following plot:(Note: you also need to label the x and y axis)

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0so far.. i have : clc clear theta=0:pi:4*pi; plot(theta,cos(theta)) xlabel('theta') ylabel('cos(theta)') grid off but it still doesn't look like the plot it gives and i don't know what else to do

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0I will try it on my machine

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0I see your problems , you needs more values for theta than just 4 values

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0clc clear x = 0:pi/1000:4*pi plot(x,cos(x)) xlabel('theta') ylabel('cos(theta)') grid off

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0it's perfect other then the x values don't appear the same as in the picture i uploaded.. you see that?

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0yeah, that's what I am looking at too

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0clc clear x = 0:pi/1000:4*pi theta=0:pi:4*pi plot(x,cos(x)) set(gca,'XTick',0:pi:4*pi) set(gca,'XTickLabel',{'0','pi','2 pi','3 pi',' 4 pi'}) xlabel('theta') ylabel('cos(theta)') grid off

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0it's perfect!!! thank you! my goodness you're amazing!
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.