bpsk

7 visualizzazioni (ultimi 30 giorni)
mahaveer hanuman
mahaveer hanuman il 24 Apr 2011
sir how to convert 0 to -1 and 1 to +1
  1 Commento
Oleg Komarov
Oleg Komarov il 24 Apr 2011
1 to +1? Is it for displaying purposes?

Accedi per commentare.

Risposta accettata

Oleg Komarov
Oleg Komarov il 24 Apr 2011
% 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,:)

Più risposte (1)

mahaveer hanuman
mahaveer hanuman il 24 Apr 2011
thanks its works

Community Treasure Hunt

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

Start Hunting!

Translated by