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 endendfor i=1:r op1(i)=X(i.c);endop1=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 endip=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 endtic;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 endendt = 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;endcountop = 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);
Best Answer