필터 지우기
필터 지우기

Why does the code shows match values and mismatch values??

조회 수: 1 (최근 30일)
Ayesha Punjabi
Ayesha Punjabi 2019년 6월 10일
댓글: Walter Roberson 2019년 6월 11일
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;%pointer is for diagnostic purposes
end
if v(pin)<=tem_L
tem_L=v(pin);
low_p=pin;%printer is for diagnostic purposes
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
  댓글 수: 4
Ayesha Punjabi
Ayesha Punjabi 2019년 6월 10일
no_ofbits = 20;
p_gain = 32;
pin=m+(p-1)*p_gain;
Walter Roberson
Walter Roberson 2019년 6월 11일
Undefined function or variable 'process_g'.
Undefined function or variable 'o_p'.
Undefined function 'quick' for input arguments of type 'double'.
Undefined function or variable 'strong'.
Undefined function or variable 'v'.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by