求大神解释matlabfunction f=angel(x);s=50;crank=44;rack=220;fx=0;%曲柄初始角fai0=acos(((crank+x(1))^2+rack^2-x(2)^2)/(2*(crank+x(1))*rack)); psi0=acos(((crank+x(1))^2-x(2)^2-rack^2)/(2*x(2)*rack)); %摇杆初始角for i=1:sfai=fai0+0.5*pi*i/
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/31 02:30:15
求大神解释matlabfunction f=angel(x);s=50;crank=44;rack=220;fx=0;%曲柄初始角fai0=acos(((crank+x(1))^2+rack^2-x(2)^2)/(2*(crank+x(1))*rack)); psi0=acos(((crank+x(1))^2-x(2)^2-rack^2)/(2*x(2)*rack)); %摇杆初始角for i=1:sfai=fai0+0.5*pi*i/
求大神解释matlab
function f=angel(x);
s=50;crank=44;rack=220;fx=0;
%曲柄初始角
fai0=acos(((crank+x(1))^2+rack^2-x(2)^2)/(2*(crank+x(1))*rack));
psi0=acos(((crank+x(1))^2-x(2)^2-rack^2)/(2*x(2)*rack)); %摇杆初始角
for i=1:s
fai=fai0+0.5*pi*i/s;
psi=psi0+2*(fai-fai0)^2/(3*pi);
ri=sqrt(crank^2+rack^2-2*crank*rack*cos(fai));
alfi=acos((ri^2+x(2)^2-x(1)^2)/(2*ri*x(2)));
bati=acos((ri^2+rack^2-crank^2)/(2*ri*rack));
if fai>0 & faipi & fai angel at 6
fai0=acos(((crank+x(1))^2+rack^2-x(2)^2)/(2*(crank+x(1))*rack));
求大神解释matlabfunction f=angel(x);s=50;crank=44;rack=220;fx=0;%曲柄初始角fai0=acos(((crank+x(1))^2+rack^2-x(2)^2)/(2*(crank+x(1))*rack)); psi0=acos(((crank+x(1))^2-x(2)^2-rack^2)/(2*x(2)*rack)); %摇杆初始角for i=1:sfai=fai0+0.5*pi*i/
这个函数不能直接运行,得另写一个脚本调用之.
% File:main.m
x = 1;
y = angel(x)