# Binary value convert.

1 visualizzazione (ultimi 30 giorni)
Noman Abir il 2 Gen 2021
Commentato: Ameer Hamza il 2 Gen 2021
I have a binary bit sequence A = [0 1 0 1;1 0 0 1; 0 0 0 1; 1 0 0 1]; How can i convert all the 0 values into -1.??
The final output will become as A = [-1 1 -1 1;1 -1 -1 1;-1 -1 -1 1;1 -1 -1 1];
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Ameer Hamza il 2 Gen 2021
A = [0 1 0 1;1 0 0 1; 0 0 0 1; 1 0 0 1];
A(A==0) = -1;
##### 3 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
Image Analyst il 2 Gen 2021
Offline private consulting is not usually done. Why can't you continue to get help here in the Answers forum, where everyone can benefit from the questions and answers?
Ameer Hamza il 2 Gen 2021
Yes, it is better to post your question on this forum so that you have a better chance of getting any help, and the answers will also be helpful for others.

Accedi per commentare.

### Categorie

Scopri di più su Video games in Help Center e File Exchange

R2014b

### Community Treasure Hunt

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

Start Hunting!

Translated by