If else log2 statement on matrix
Mostra commenti meno recenti
I have a matrix that is about 3000x7, containing either a number or a zero. I'd like to get the log2 value of each number, but if the value was zero, I'd like for it to ignore that value.
What I have tried initally: if matrix>0 log2(matrix); else matrix==0; end
I know I'm most likely no where close to correct, but I'm still very new to Matlab. Any help would be appreciated! Thank you!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Get Started with MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!