Matlab求助:怎么把程序中的点连成线m = 4000; g = 10; L = 4; Peak_force_min = inf;Peak_force = 0;for delta = 40:0.5:85for theta = -20:0.5:80c2 = (2.2^2 - 1.2^2)/(cosd(delta - 20) - cosd(delta + 80));c1 = 2.2^2 + c2*cosd(delta +80);a = ((c

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 01:34:05
Matlab求助:怎么把程序中的点连成线m = 4000; g = 10; L = 4; Peak_force_min = inf;Peak_force = 0;for delta = 40:0.5:85for theta = -20:0.5:80c2 = (2.2^2 - 1.2^2)/(cosd(delta - 20) - cosd(delta + 80));c1 = 2.2^2 + c2*cosd(delta +80);a = ((c
xTn@}q֎EN['8&PЋ(*Fo< wΥ)Ι=;Džfl}u~8v}/_3u0yI Hw9n r;3\ow7Q1g:3Cx/ϽoxW |XsG1tՔU ƸYk05:EP+YX XXjŢE-MƅMu<3@x|#m)],dwq_`p>WP+

Matlab求助:怎么把程序中的点连成线m = 4000; g = 10; L = 4; Peak_force_min = inf;Peak_force = 0;for delta = 40:0.5:85for theta = -20:0.5:80c2 = (2.2^2 - 1.2^2)/(cosd(delta - 20) - cosd(delta + 80));c1 = 2.2^2 + c2*cosd(delta +80);a = ((c
Matlab求助:怎么把程序中的点连成线
m = 4000;
g = 10;
L = 4;
Peak_force_min = inf;
Peak_force = 0;
for delta = 40:0.5:85
for theta = -20:0.5:80
c2 = (2.2^2 - 1.2^2)/(cosd(delta - 20) - cosd(delta + 80));
c1 = 2.2^2 + c2*cosd(delta +80);
a = ((c1 + c2)^0.5 + (c1 - c2)^0.5)/2;
b = c2/(2*a);
r = sqrt(a^2 + b^2 - 2*a*b*cosd(theta + delta));
F = r*m*g*L*cosd(theta)/(a*b*sind(theta + delta));
if F > Peak_force
Peak_force = F;
end
end
if Peak_force_min > Peak_force
Peak_force_min = Peak_force;
end
plot(delta,Peak_force,'k-'),grid on;
hold on
Peak_force=0;
end
disp(Peak_force_min)
感觉是因为每次输出一个点,然后用hold on保持住了.但怎么才能输出一条曲线呢?

Matlab求助:怎么把程序中的点连成线m = 4000; g = 10; L = 4; Peak_force_min = inf;Peak_force = 0;for delta = 40:0.5:85for theta = -20:0.5:80c2 = (2.2^2 - 1.2^2)/(cosd(delta - 20) - cosd(delta + 80));c1 = 2.2^2 + c2*cosd(delta +80);a = ((c
delta = 40:0.5:85;
theta = linspace(-20,80,length(delta));
c2 = (2.2^2 - 1.2^2)./(cosd(delta - 20) - cosd(delta + 80));
c1 = 2.2^2 + c2.*cosd(delta +80);
a = ((c1 + c2).^0.5 + (c1 - c2).^0.5)/2;
b = c2./(2*a);
r = sqrt(a.^2 + b.^2 - 2*a.*b.*cosd(theta + delta));
F = r.*m*g*L.*cosd(theta)./(a.*b.*sind(theta + delta));
Peak_force = F(F > Peak_force);
Peak_force_min = Peak_force(Peak_force_min > Peak_force);
plot(delta,Peak_force,'k-'), grid on;
disp(min(Peak_force_min))
按上面语句试试