Effacer les filtres
Effacer les filtres

how to select non-zero filled column(s) in matlab

1 vue (au cours des 30 derniers jours)
Andras Gergely
Andras Gergely le 23 Juil 2019
Hi,
I would need to select non-zero filled column from arrays when series of instruction would proceed.
Just an example:
pwm1=log10(pw65(pWM_range))/log10(pw1(pWM_range)); (attached underneath)
pwr1=mean(pwm1(:,1));
and tha last one is the 1st column filled with non-zero numbers but there are plenty of these instrucction should be calculcated and always changing. So, there is no way to select it all the time.
Could you help with an answer?
Many thanks for the help in advance.
Kind regards.
Bandi
0.997700493582516 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.974649482475760 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.976383851005291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.983604299096846 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.885228173640926 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.647149490813294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.527607374558469 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.466654449446246 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.432091745484335 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.412744391480086 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.405327410558207 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.408704326744636 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.423647246939157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.452405499942985 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.501664174171490 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.579243076900571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  1 commentaire
Walter Roberson
Walter Roberson le 23 Juil 2019
any(pwr1) is true for columns that contain at least one nonzero

Connectez-vous pour commenter.

Réponse acceptée

Andras Gergely
Andras Gergely le 23 Juil 2019
Dear Roberson,
Yes, it really works fine.
So, many thanks for that.
Cheers!
Kind regards.
Bandi

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by