Could you please rectify the error in the following program

4 ビュー (過去 30 日間)
priya nair
priya nair 2016 年 3 月 14 日
コメント済み: priya nair 2016 年 3 月 15 日
To find the redundant feasibility matrix
clc
i=input ('enter the no.of constriants');
j=input( 'enter the no.of variables');
k=i;
for m=1:i
for n=1:j
if p=m-k
F= a(m,n)-[b(m,:)*a(k,n)/b(k,:)];
else
disp(F=0)
end
l=fminbnd symsum(subminus F(m,n),m;[1,i];n;[1,j));
for p=m-l
if l=fminbnd
assignin('base',lambda(l,:)=1);
else
assignin('base',lambda(i,:)=0);
end
end
assignin('base',p=m-l);
min(symsum subminus[lambda(l,:)*F(l,n)+symsum(lambda*F(m,n),m[1,i] n,[1,j]]);
if lambda(l,:)*F(l,n)>=0
lambda*F(i,j)+lambda(l,:)*F(l,j)>=0;
lambda>=0;
else
disp('redundancy cannot be considered');
end
if
lambda(m,:)*F(m,n)>=0;
lambda(m,:)>=0
lambda(m,:)>0
disp('fval=0');
disp('the kth constraint is redundant');
else
disp('the redundancy of the kth constraint cannot be determined');
end
end
end
If I run the program I get the error as Error: File: algorithm.m Line: 7 Column: 13 The expression to the left of the equals sign is not a valid target for an assignment.
  1 件のコメント
priya nair
priya nair 2016 年 3 月 15 日
am getting the error in
l=fminbndsymsum(subminus F(m,n);m;[1,i];n;[1,j]);
am getting error as Error: File: algorithm.m Line: 12 Column: 34 Unexpected MATLAB expression.

サインインしてコメントする。

採用された回答

Andreas Goser
Andreas Goser 2016 年 3 月 14 日
Line 7 is
if p=m-k
You probably do not want to assign (=), but compare (==, ~=, etc)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by