"Ong Teng" <email@example.com> wrote in message <firstname.lastname@example.org>... > Hi Greetings, > > Can I know whats wrong with my code below? Anyone can help? EvalHeartSet is my data set that loaded into matlab to evaluate the data. > > ev=EvalHeartSet(:,end); > rmse(1)=norm(evu(1,:)-ev)/sqrt(length(evu(1,:))); > rmse(2)=norm(evu(2,:)-ev)/sqrt(length(evu(2,:))); > > subplot(2,1,1); > if rmse(1)<rmse(2) > r=1; > else > r=2; > end > > str=sprintf('Testing Set RMSE: %f',rmse(r)); > disp(str); > ctr=0; > for i=1:m > if evu(r,i)==ev(i) > ctr=ctr+1; > end > end > > Thanks.
What makes you think anything is wrong with it? What error messages are you getting? Wrong answers?
Without knowing the values of ev & evu, there is not much we can do to help.
One possibility: it is bad practice to compare real numbers for equality as in: