one_c=0;
tem_h=-100;
tem_L=100;
high_p=0;
low_pr=0;
o_pr=0;
for p = 1:no_ofbits
for m = 1:process_g
pin=m+(p-1)*process_g;
o_p=o_p+quick(pin);
if strong(pin)==1
one_c=one_c+1;
if v(pin)>=tem_h
tem_h=v(pin);
high_p=pin;
end
if v(pin)<=tem_L
tem_L=v(pin);
low_p=pin;
end
end
end
end
am = temp_h + temp_L;
am = (ad/2);
a1 = (am/5);
b1=t(win(1));
verify(1)=a1;
verify(2)=b1;
verify(3)=o_p;
I am trying to run this code. everytime I run the code matrix verify shows (1), (2) columns matched and (3) which is what I want as 0. But when I run the same code everytime during 8th or 11th time it shows a mismatch between (1), (2). I have run this code many times. but still it shows correct result, but during 7times and 8th times it fails. I am trying it extremely hard to understand why is it showing a mismatch and then again match after that.
Can someone please help me in this? I am not able to list out the reason why is it behaving correct in some runs and changes output after 8th or 9th run. Kindly help