matlab 出错MATLAB问题 function vchu=tiji(ii,h)syms x y z m t h h2 r2 r1 r3 m1 s v3 v1 h1 ;a=3/2;b=3/2;l=8;rr=1.625;%球体半径%r=ii(3); for i=1:size(h)t=h(i)/1000;h2=(t-1.5)*cos(ii(2))+1.5-2*tan(ii(3)); %h2符号变量function vchu=tiji(ii,h)r2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 17:43:46
matlab 出错MATLAB问题 function vchu=tiji(ii,h)syms x y z m t h h2 r2 r1 r3 m1 s v3 v1 h1 ;a=3/2;b=3/2;l=8;rr=1.625;%球体半径%r=ii(3); for i=1:size(h)t=h(i)/1000;h2=(t-1.5)*cos(ii(2))+1.5-2*tan(ii(3)); %h2符号变量function vchu=tiji(ii,h)r2
matlab 出错
MATLAB问题
function vchu=tiji(ii,h)
syms x y z m t h h2 r2 r1 r3 m1 s v3 v1 h1 ;
a=3/2;
b=3/2;
l=8;
rr=1.625;%球体半径
%r=ii(3);
for i=1:size(h)
t=h(i)/1000;
h2=(t-1.5)*cos(ii(2))+1.5-2*tan(ii(3)); %h2符号变量function vchu=tiji(ii,h)
r2=sqrt(rr^2-(rr-1)^2);%垂直于z轴的最大圆半径
r1=sqrt(rr^2-(rr-h2)^2);%垂直于y轴的最大圆的半径 h=rr r1=rr
t=sqrt(r1^2+r2^2-rr^2);
r3=sqrt(rr^2-r1^2);
m1=int(sqrt(rr^2-x^2-y^2),y,0,sqrt(r2^2-x^2));
s=int(m1,x,0,r2);
v3=double(s*2);
if h2 optim\private\lsqncommon
User supplied function failed with the following error:
Function 'le' is not defined for values of class 'sym'.
Error in ==> lsqcurvefit at 149
[x,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ...
Error in ==> Untitled5 at 1212
[ii,resnorm]=lsqcurvefit(@tiji,ii0,h,ydata)
请各位大哥帮忙给看看程序出错在哪儿帮忙改正一下 ,
matlab 出错MATLAB问题 function vchu=tiji(ii,h)syms x y z m t h h2 r2 r1 r3 m1 s v3 v1 h1 ;a=3/2;b=3/2;l=8;rr=1.625;%球体半径%r=ii(3); for i=1:size(h)t=h(i)/1000;h2=(t-1.5)*cos(ii(2))+1.5-2*tan(ii(3)); %h2符号变量function vchu=tiji(ii,h)r2
变量 le 没有赋值?