why won't Matlab plot anything?
1 回表示 (過去 30 日間)
古いコメントを表示
thetaP=linspace(0, 2*pi);
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')
when R1 and R2 are defined
0 件のコメント
回答 (1 件)
Kojiro Saito
2023 年 6 月 13 日
Your code works fine.
R1=5;
R2=7;
thetaP=linspace(0, 2*pi);
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')
Possibly, figure is being off. Please try adding figure before plot.
figure;
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!