matlab 出错MATLAB问题 function vchu=tiji(ii,h)syms x y z m t h h
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/04/30 02:18:43
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问题
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)
请各位大哥帮忙给看看程序出错在哪儿帮忙改正一下 ,
变量 le 没有赋值?
matlab 出错MATLAB问题 function vchu=tiji(ii,h)syms x y z m t h h
matlab中积分syms h x sx=(h-1.5)*sqrt(1.5^2-x^2-(h-1.5)^2)+sqrt(
matlab t=linspace(0,pi/10,1000); >> syms x y z% >> th=[x*(1+
MATLAB程序问题解一个方程组如下syms x y z t a b c d m s; f = x+z-a;g = (2
function Y = nhanchap(X,H)
matlab syms 运行出错
W,H,Y,L,X,M,T,C,S,Z
matlab新手问题h=0.1;t=0:h:1;N=length(t);y=ones(1,N);for k=2:N;y(
[c,h] = contour(x,y,z,[-6,-5,-4:0.5:4,5,6,7.5]) matlab中该句含义
matlab创建function出错,
Matlab积分报错 syms x y dx dy z t;global e a c;x=a*cos(t);y=a*e*
matlab中 [c,h] = contour(X,Y,Z,[0 0]),X,Y为大小为mx1,nx1,z的大小为mxn