bpsk

7 次查看(过去 30 天)
mahaveer hanuman
mahaveer hanuman 2011-4-24
sir how to convert 0 to -1 and 1 to +1
  1 个评论
Oleg Komarov
Oleg Komarov 2011-4-24
1 to +1? Is it for displaying purposes?

请先登录,再进行评论。

采纳的回答

Oleg Komarov
Oleg Komarov 2011-4-24
% Example input
A = randi([0 1],10,1);
Cellarray lookup table:
B = {'-1', '+1'};
C = B(A+1).';
Or char array table:
B = ['-1'; '+1'];
C = B(A+1,:)

更多回答(1 个)

mahaveer hanuman
mahaveer hanuman 2011-4-24
thanks its works

Community Treasure Hunt

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

Start Hunting!

Translated by