Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Andras Gergely
Andras Gergely am 23 Jul. 2019
Beantwortet: Andras Gergely am 23 Jul. 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 Kommentar
Walter Roberson
Walter Roberson am 23 Jul. 2019
any(pwr1) is true for columns that contain at least one nonzero

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Weitere Antworten (0)

Tags

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by