Last Question of the Night

% Author: Sean Walsh % Write a script that plots r=cos(2theta) from 0 to 2pi. disp('Using MatLabs Polar command we graph') theta=linspace(0,2*pi); r=cos(2*theta); polar(theta,r) disp('Using MatLabs Plot command we graph') x=r.*cos(theta); y=r.*sin(theta); plot(x,y) disp('When subplotted together')
^How does one subplot that? Thank you in advance. :)

댓글 수: 2

Jan
Jan 2013년 1월 31일
Please format your code properly. Thanks.
Image Analyst
Image Analyst 2013년 1월 31일
And of course, use a meaningful subject line, not a useless one like "Last Question of the Night".

댓글을 달려면 로그인하십시오.

 채택된 답변

Matt J
Matt J 2013년 1월 31일

0 개 추천

subplot(1,2,1)
polar(theta,r);
subplot(1,2,2)
plot(x,y);

추가 답변 (2개)

Sean
Sean 2013년 1월 31일

0 개 추천

Thanks :o May I ask how you got there though? I wanna learn too:)

댓글 수: 1

Matt J
Matt J 2013년 1월 31일
I'm sure it's in the Getting Started guide somewhere. Other than that, there's
>> docsearch subplot
>> doc subplot
>> help subplot

댓글을 달려면 로그인하십시오.

Sean
Sean 2013년 1월 31일

0 개 추천

thank you :3

댓글 수: 1

Jan
Jan 2013년 1월 31일
Please post comments as comments and not as answers. Thanks.

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2013년 1월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by