I am supposed to plot the quarter circle below and call the instances from it.
for theta=0:-2.25:-90
R=.25;
xed=R*cosd(theta)
yed=R*sind(theta)
end
This code gives me the correct values but I cannot call on an instance.
theta=0:-2.25:-90;
for ii=1:length(theta)
R=.25;
xed(ii)=R*cosd(theta)
yed(ii)=R*sind(theta)
end
This code gives me incorrect values but I can call on an instance.

 채택된 답변

David Hill
David Hill 2020년 6월 15일

1 개 추천

t=linspace(0,-pi/2,1000);
[x,y]=pol2cart(t,.25);
plot(x,y);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

태그

질문:

2020년 6월 15일

답변:

2020년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by