How can I find non-zero without Empty matrix: 1-by-0 in my code.
    6 views (last 30 days)
  
       Show older comments
    
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
2 Comments
  Walter Roberson
      
      
 on 22 Apr 2016
				What is the difference between this question and your earlier http://www.mathworks.com/matlabcentral/answers/280108-empty-matrix-1-by-0-mse other than that this question has more of your code?
Answers (0)
See Also
Categories
				Find more on Logical in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

