程序提示:The expression to the left of the equals sign is not a
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/08/27 03:24:20
程序提示:The expression to the left of the equals sign is not a valid target for an assignment.
程序如下:
function y=K(k)
%program to compute the complete eliptic integrals K(k)
%Using the arith-geom mean method
[m n]= size(k);
if m+ n= =2
K=[k k];
end
if m= =1
k= k';
end
a(:,1)=ones(k);
b(:,1)=sqrt(ones(k)-k.*k);
c(:,1)=k;
i=1;
while max(c(:,1))>eps
a(:,i+ 1)=.5*(a(a:,i)+b(:,i));
b(:,i+ 1)=sqrt(a(:,i).*b(:,i));
c(:,i+ 1)=.5*(a(:,i)-b(:,i));
i=i+1
end
t=pi*ones(k)./(2*a(:,i));
if m+n= =2
y=t(1,:);
elseif m= =1
y= t';
else
y= t;
end
运行debug后提示
Error:File:F:\matlab7\work\K.m Line:5 Column:8
The expression to the left of the equals sign is not a valid target for an assignment.
错在哪了呢
程序如下:
function y=K(k)
%program to compute the complete eliptic integrals K(k)
%Using the arith-geom mean method
[m n]= size(k);
if m+ n= =2
K=[k k];
end
if m= =1
k= k';
end
a(:,1)=ones(k);
b(:,1)=sqrt(ones(k)-k.*k);
c(:,1)=k;
i=1;
while max(c(:,1))>eps
a(:,i+ 1)=.5*(a(a:,i)+b(:,i));
b(:,i+ 1)=sqrt(a(:,i).*b(:,i));
c(:,i+ 1)=.5*(a(:,i)-b(:,i));
i=i+1
end
t=pi*ones(k)./(2*a(:,i));
if m+n= =2
y=t(1,:);
elseif m= =1
y= t';
else
y= t;
end
运行debug后提示
Error:File:F:\matlab7\work\K.m Line:5 Column:8
The expression to the left of the equals sign is not a valid target for an assignment.
错在哪了呢
下次提问时,最好在前面加上:“计算机编程求助”等类似的话.
不然系统自动把你的问题分到“英语考试”里来了,这里很少有人能帮到你.
不然系统自动把你的问题分到“英语考试”里来了,这里很少有人能帮到你.
The expression to the left of the equals sign is not a valid
MATLAb 提示The expression to the left of the equals sign is no
matlab提示 The expression to the left of the equals sign is no
matlab出错:The expression to the left of the equals sign is no
MATLAB调试出现The expression to the left of the equals sign is n
【matlab】Error: The expression to the left of the equals sign
MATLAB编程出现问题,The expression to the left of the equals sign i
matlab Error:The expression to the left of the equals sign i
英语翻译这是MATLAB报错的内容:The expression to the left of the equals s
Which of the followings is not a traffic sign.
A is to the left of B
关于matlab,调试的时候出现Error:The expression to the left of the equa