我正在错误
1视图(最近30天)
显示较旧的评论
数学错误
t = linspace(0,15);
x =(3*t。^2-5)*(t。^3)*sind(t./2)-8*t+27;
v = 6*t-2.5*(t。^3)*cosd(t./2)-15*t。^2*sind(t./2)-8;
a = 1.25*t^3*sind(t./2)-15*t。^2*cosd(t./2)-30*t*sind(t/2)+6;
绘图(t,x,' - ',t,v,' - ',t,a,' - 。',''lineWidth',1)
标题('streamline')
Xlabel('Time')
Ylabel('速度')
传奇(“ Bestoutside”)
网格
0评论
答案(3)
Star Strider
2021年10月28日
在各处使用元素操作,它起作用 -
t = linspace(0,15);
x =(3*t。^2-5)。*(t。^3)。*sind(t./2)-8*t+27;
v = 6*t-2.5*(t。^3)。*cosd(t./2)-15。*t。^2.*sind(t./2)-8;
a = 1.25*t。^3.*sind(t./2)-15。*t。^2.*cosd(t./2)-30。*t。*sind(t/2)+6;
数字
情节(t,x,' - ',电视,' - ',t,a,' - 。',,,,'行宽',1)
标题('精简')
Xlabel('时间')
ylabel('速度')
传奇('X',,,,'v',,,,'一个',,,,'地点',,,,“ bestoutside”)
网格上
这
传奇
呼叫还需要包括绘制的变量以及适合该值的名称。
。
0评论
Stephen23
2021年10月28日
编辑:Stephen23
2021年10月28日
您需要使用数组操作,而不是矩阵操作(您错过了乘法):
t = linspace(0,15);
x =(3*t。^2-5)。*(t。^3)。*sind(t./2)-8。*t+27;
% ^ ^ ^ ^
v = 6*t-2.5*(t。^3)。*cosd(t./2)-15*t。^2.*sind(t./2)-8;
% ^ ^
a = 1.25*t。^3.*sind(t./2)-15。*t。^2.*cosd(t./2)-30。*t。*sind(t/2)+6;
% ^ ^ ^ ^ ^ ^ ^ ^
情节(t,x,' - ',电视,' - ',t,a,' - 。',,,,'行宽',1)
标题('精简')
Xlabel('时间')
ylabel('速度')
传奇('地点',,,,“ bestoutside”)%我也为您修复了这个
网格上