Hi all, I need to map a bulk of data whose range is [-3 -1 1 3] to a binary data [00 01 10 11]. Is there any matlab inbuilt function which performs this operation.
Thanks in advance.. Sowmya..

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2012년 4월 12일

0 개 추천

bidata = [0 0; 0 1; 1 0; 1 1]
out = bidata*[4;2] - 3
ADD inverse problem
bidata = floor(rem(bsxfun(@rdivide,(data(:) + 3),[4 2]),2));

댓글 수: 1

DSP Masters
DSP Masters 2012년 4월 12일
Thanks, but How can I map for the data size [512,1]..?

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

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2012년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by