Check signal error.

1 回表示 (過去 30 日間)
Nam Pham
Nam Pham 2015 年 11 月 13 日
Hello, I want to write code to check signal error. error when bit~=0&&not alternative pre bit; except for 1 0 0 1
for j=1:length(sig)
if sig(j)~=0;
break;
end
end
prv=sig(j);
i=j+1;
while i<=length(sig)
if sig(i)~=0
if (i>=4)&&sig(i)==prv&&sig(i)==sig(i-3)
pre=sig(i);
elseif (i>=5)&&sig(i)==prv&&sig(i)==sig(i-4)
pre=sig(i);
elseif sig(i)==prv
msgbox('luan phien hoac B00V hoac 000V');
return;
end
i=i+1;
elseif sig(i)==0
i=i+1;
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeoscience についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by