counter

조회 수: 2 (최근 30일)
mahaveer hanuman
mahaveer hanuman 2011년 7월 21일
i have b={[1 0][0 0][0 1][1 1]...30 }and I={[0 1][1 0][ 0 0][0 1]......30bits} how can i compare b with I using counter
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2011년 7월 21일
What do you mean compare them with a counter? Find out how many cells are equal? Or where the cells are equal? Are all of the data cells 1x2?

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

답변 (1개)

Walter Roberson
Walter Roberson 2011년 7월 21일
allequal = true;
if length(b) ~= length(I)
disp('different lengths, not equal');
allequal = false;
else
allequal = true;
for K = 1:length(b)
if ~isequal(b{K}, I{K})
fprintf(1, 'b{%d} ~= I{%d}\n', K, K);
allequal = false;
end
end
end
At the end, allequal will be true if all the values are equal or if both b and I are empty. Having it be true for empty is consistent with the behaviour of MATLAB's all() function.
  댓글 수: 3
Walter Roberson
Walter Roberson 2011년 7월 21일
No, I do not have any idea about soft decision coding in BPSK.
Jan
Jan 2011년 7월 21일
I do not have any idea about soft decision coding in BPSK also.
@Walter: Did I say "thank you" already today? It is fine that you support this forum.

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

카테고리

Help CenterFile Exchange에서 BPSK에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by