matlab中提示需要更多输入参数才能运行,什么意思,我应该怎么做
function[f3]=chengxu(h,c,d)a=c*pi/180;b=d*pi/180;h1=1.5-(1.5-h)*cos(b);h2=(1.5+h)*cos...
function [f3]=chengxu(h,c,d)
a=c*pi/180;
b=d*pi/180;
h1=1.5-(1.5-h)*cos(b);
h2=(1.5+h)*cos(b)-1.5;
k=size(h);
c=0:0.1:4.0;
d=0:0.1:4.0;
e=0;
f=0;
y1(1,1)=0;
for j=1:41
for m=1:41
for i=1:k
v(i)=f3(h(i),c(j),d(m));
end
sum=0;
for n=2:k
v1(n-1)=v(n-1)-v(n);
sum=sum+(v1(n-1)-v0(n-1))^2;
end
y1(j,m)=sum;
end
end
smin=y1(1,1);
for j=1:41
for m=1:41
if (y1(j,m)-smin)<0
smin=y1(j,m);
e=j;
f=m;
end
end
end
e
f
%调用f3函数
if 0<h<=6*tan(a)
y=0:0.00001:(h1/tan(a)+2);
m=1.5-h1+(y-2)*tan(a);
f=2.25.*acos(m./1.5)-m.*sqrt(2.25-m.^2);
t1=trapz(y,f);
y1=0:0.0001:(h1+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt((3*y1-y1.^2)./(0.390625+3.*y1-y1.^2)))-0.625.*sqrt(3.*y1-y1.^2);
t2=trapz(y1,f1);
f3=t1+t2;
end
if 6*tan(a)<h<=1.5
y=0:0.0001:8;
m=1.5-h1+(y-2)*tan(a);
f=2.25.*acos(m./1.5)-m.*sqrt(2.25-m.^2);
t3=trapz(y,f);
y1=0:0.0001;(h1+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt(3*y1-y1.^2)./(0.390625+3.*y1-y1.^2))-0.625.*sqrt(3.*y1-y1.^2);
t4=trapz(y1,f1);
y2=0:0.0001:(h2-6*tan(a));
f2=(0.390625-y2.^2+3.*y2).*asin(sqrt(3*y2-y2.^2)./(0.390625+3.*y2-y2.^2))-0.625.*sqrt(3.*y2-y2.^2);
t5=trapz(y2,f2);
f3=t3+t4+t5;
end
if 1.5<h<=h-2*tan(a)
y=0:0.0001:8;
m=1.5-h2+(y-2)*tan(a);
f=2.25.*acos(m/1.5)-m.*sqrt(2.25-m.^2);
t6=trapz(y,f);
y1=0:0.0001:(h2+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt(3*y1-y1.^2)./(0.390625+3.*y1-y1.^2))-0.625.*sqrt(3.*y1-y1.^2);
t7=trapz(y1,f1);
y2=0:0.0001:(h2-6*tan(a));
f2=(0.390625-y2.^2+3.*y2).*asin(sqrt(3*y2-y2.^2)./(0.390625+3.*y2-y2.^2))-0.625.*sqrt(3.*y2-y2.^2);
t8=trapz(y2,f2);
f3=t6+t7+t8;
end 展开
a=c*pi/180;
b=d*pi/180;
h1=1.5-(1.5-h)*cos(b);
h2=(1.5+h)*cos(b)-1.5;
k=size(h);
c=0:0.1:4.0;
d=0:0.1:4.0;
e=0;
f=0;
y1(1,1)=0;
for j=1:41
for m=1:41
for i=1:k
v(i)=f3(h(i),c(j),d(m));
end
sum=0;
for n=2:k
v1(n-1)=v(n-1)-v(n);
sum=sum+(v1(n-1)-v0(n-1))^2;
end
y1(j,m)=sum;
end
end
smin=y1(1,1);
for j=1:41
for m=1:41
if (y1(j,m)-smin)<0
smin=y1(j,m);
e=j;
f=m;
end
end
end
e
f
%调用f3函数
if 0<h<=6*tan(a)
y=0:0.00001:(h1/tan(a)+2);
m=1.5-h1+(y-2)*tan(a);
f=2.25.*acos(m./1.5)-m.*sqrt(2.25-m.^2);
t1=trapz(y,f);
y1=0:0.0001:(h1+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt((3*y1-y1.^2)./(0.390625+3.*y1-y1.^2)))-0.625.*sqrt(3.*y1-y1.^2);
t2=trapz(y1,f1);
f3=t1+t2;
end
if 6*tan(a)<h<=1.5
y=0:0.0001:8;
m=1.5-h1+(y-2)*tan(a);
f=2.25.*acos(m./1.5)-m.*sqrt(2.25-m.^2);
t3=trapz(y,f);
y1=0:0.0001;(h1+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt(3*y1-y1.^2)./(0.390625+3.*y1-y1.^2))-0.625.*sqrt(3.*y1-y1.^2);
t4=trapz(y1,f1);
y2=0:0.0001:(h2-6*tan(a));
f2=(0.390625-y2.^2+3.*y2).*asin(sqrt(3*y2-y2.^2)./(0.390625+3.*y2-y2.^2))-0.625.*sqrt(3.*y2-y2.^2);
t5=trapz(y2,f2);
f3=t3+t4+t5;
end
if 1.5<h<=h-2*tan(a)
y=0:0.0001:8;
m=1.5-h2+(y-2)*tan(a);
f=2.25.*acos(m/1.5)-m.*sqrt(2.25-m.^2);
t6=trapz(y,f);
y1=0:0.0001:(h2+2*tan(a));
f1=(0.390625-y1.^2+3.*y1).*asin(sqrt(3*y1-y1.^2)./(0.390625+3.*y1-y1.^2))-0.625.*sqrt(3.*y1-y1.^2);
t7=trapz(y1,f1);
y2=0:0.0001:(h2-6*tan(a));
f2=(0.390625-y2.^2+3.*y2).*asin(sqrt(3*y2-y2.^2)./(0.390625+3.*y2-y2.^2))-0.625.*sqrt(3.*y2-y2.^2);
t8=trapz(y2,f2);
f3=t6+t7+t8;
end 展开
1个回答
展开全部
意思是参数提供不足,无法运行。
解决的方法和详细的操作步骤如下:
1、第一步,在Simulink中创建一个新模型,并根据以下电路建立模型,见下图,转到下面的步骤。
2、第二步,执行完上面的操作之后,将电源模块和测量模块的参数设置到位,见下图,转到下面的步骤。
3、第三步,执行完上面的操作之后,例如,锁相环的参数设置见下图,转到下面的步骤。
4、第四步,执行完上面的操作之后,执行运行,可以看到精确的锁相,见下图。这样,就解决了这个问题了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询