【发布时间】:2012-10-17 19:03:30
【问题描述】:
如何在情节中改变我的虚线???我知道它是这样完成的 plot(x, y, '-') 但即使我把它放在那里我也会得到虚线
naj_cas = 0;
uhol_deg = -5;
v = 20;
g = 9.80665;
while uhol_deg < 85
uhol_deg = uhol_deg + 10;
uhol_rad = degtorad(uhol_deg);
for t = 0:.1:5
x = v * t * cos(uhol_rad);
y = v * t * sin(uhol_rad) - 0.5 * g * t^2;
axis([0 50 0 25])
subplot(211);
plot(x, y)
hold on
end
end
【问题讨论】:
-
你能发布一个显示你的问题的工作代码吗?此代码不运行。
-
在 matlab 中创建新脚本并运行该脚本它将起作用
-
degtorad未定义 - 它来自映射工具箱。 -
@angainor 可能是
pi*uhol_deg/180
标签: matlab plot line dotted-line