How can I find non-zero without Empty matrix: 1-by-0 in my code.

6 views (last 30 days)
k=5;
Tk=(rand(1,k)*64);
Tk=sort(Tk);
Ck=randn(1,k);
h_DSseisu = h_DS * 10000; %少数点を整数化
Tk_DS= find((abs(h_DSiidkukeiseisu))>=1); %Tk_DS%浮動小数点の丸め誤差が原因を防ぐEmpty matrix: 1-by-0
Ck_DS=h_DS(Tk_DS); %Ck_DS
How can I find non-zero without Empty matrix: 1-by-0

Answers (0)

Community Treasure Hunt

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

Start Hunting!