フィルターのクリア

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

1 回表示 (過去 30 日間)
Andras Gergely
Andras Gergely 2019 年 7 月 23 日
回答済み: Andras Gergely 2019 年 7 月 23 日
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 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 23 日
any(pwr1) is true for columns that contain at least one nonzero

サインインしてコメントする。

採用された回答

Andras Gergely
Andras Gergely 2019 年 7 月 23 日
Dear Roberson,
Yes, it really works fine.
So, many thanks for that.
Cheers!
Kind regards.
Bandi

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by