plot作图问题。
4 ビュー (過去 30 日間)
古いコメントを表示
果博东方开户账号【微8785092】
2023 年 5 月 23 日
回答済み: 果博东方游戏网址【微8785092】
2023 年 5 月 23 日
n=8;k1=200;k2=500;
for i=1:n
plot([cos((i-1)*pi/n),-cos((i-1)*pi/n)],...
[sin((i-1)*pi/n),-sin((i-1)*pi/n)],'k-','LineWidth','2');
end
这种语法提示,plot不是数值标量,请问该怎么解决?
0 件のコメント
採用された回答
果博东方游戏网址【微8785092】
2023 年 5 月 23 日
因为LineWidth参数值为数字2,不是字符2
plot([cos((i-1)*pi/n),-cos((i-1)*pi/n)],...
[sin((i-1)*pi/n),-sin((i-1)*pi/n)],'k-','LineWidth',2);
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!