フィルターのクリア

syntax error which is not going after removing

1 回表示 (過去 30 日間)
tejasvee
tejasvee 2017 年 4 月 4 日
コメント済み: Greg Heath 2017 年 12 月 7 日
hello experts, i have matlab code for disease prediction in neural network , while running there is error. please help to remove. error is at line number 77. i have put line in between * *
clear all;
clc;
X=load('ip.txt')
s=size(X)
r=s(1);
c=s(2);
for i=1:r
for j=1:(c-1)
if(X(x,j)<5)
ip1(i,j)=0;
else
ip1(i,j)=1;
end
end
end
for i=1:r
op1(i)=X(i.c);
end
op1=op/2;
counti =1;
counj=1;
for i=1:r
if(sum(ip1(i,:))~=0)
ip(counti,:)=ip1(i,:);
target(counti)=op1(i);
counti=counti+1;
else
asd(counj)= op1(i);
counj = counj+1;
end
end
ip=ip1;
target = op1;
m=2;%maximum number of output classws
[p1.n] = size(ip);
L=2;
cnc = zeros([1 p1]);
row = input('enter the value of vigilance parameter');
per1 = input('enter the value of training patterns in percentage');
per2 = input('enter the value of testing patterns in percentage');
pe1 = round(per1*p1/100);
b=ones(n,m)*(1/(1+n));
t=ones(m.n);
for ep = 1:2
for pi = 1:p1
s = ip(p1,:);
norms = sum(s);
X=s;
y=X*b;
reset = 1;
count = 0;
while(reset==1)
count =count + 1;
[maxy maxi]=max(y);
x = s.*t(maxi,:);
normx = sum(x);
if(norms == 0)
norms = 0.1;
if(normx/norms)>=row
reset = 0;
else
reset = 1;
y(maxi) = -1;
if (count > m)
reset =2;
end
end
end
if(reset == 2)
cnc(pi)=1;
else
cnc(p1)=0;
end
if(reset == 0)
b(:,maxi)=(L*x/(1+sum(x)));
*t=(maxi,:) = x;*
end
end
end
tic;
for ep=1:100
for pi = 1:pe1
s=ip(pi,:);
norms = sum(s);
x = s;
y = x*b;
reset = 1;
count = 1;
while( reset = = 1)
count = count + 1;
[maxy maxi] = max(y);
x = s.*t(maxi ,:);
normx = sum (x);
if(normx/norms)>=row)
reset = 0;
else
reset = 1;
y(maxi) = -1;
if( count> m)
reset = 2;
end
end
end
if(reset = = 0)
b(:,maxi)=(L*x/(1+sum(x)));
t(maxi,:)= X;
end
end
end
t = toc;
p = round( per2*p1/100);
for pi = (p1-p+1):p1
s=ip(pi,:);
norms = sum(s);
X = s;
y = X*b;
[maxy maxi] = max(y);
output(pi) = maxi;
end
countop = 0;
counttg = 0;
for pi = (p1-p+1):p1
if(cnc(pi)) = = 0);
counttg = counttg +1;
if(output(pi) = =target(pi))
countop = countop + 1;
end
end
% countop
% counttg
disp(per1);
disp(t);
disp(countop);
disp(counttg);
disp(countop/counttg*100);

採用された回答

Greg Heath
Greg Heath 2017 年 4 月 5 日
t=(maxi,:) = x;
is illegal. You cannot have more than 1 equal sign per statement. Use
t=(maxi,:);
x =t;
Hope this helps
Thank you for formally accepting my answer
Greg

その他の回答 (1 件)

Mahima Goyen
Mahima Goyen 2017 年 12 月 7 日
Hello, Can you please share your whole code? or just email to mahimagoyen1996@gmail.com
  1 件のコメント
Greg Heath
Greg Heath 2017 年 12 月 7 日
Either
1. Down load the attachment
or
2 Cut and paste from the question
Greg

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

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by