I want to get the number of rows in doulble matrix but kept recieve an error
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
I have varible W1 type double and size 20x5
I workspace the varible looks like
Name    Value
W1        20x5
I can know the number of row by pressing length command but does not work with size command and shows an error any help please
With lenghth command
length(W1)
  ans =
      20
The tpye of the variable
class(W1)
   ans = 
        double
But with size does not work
 size(W1)
    Subscript indices must either be real positive integers or logicals.
댓글 수: 0
채택된 답변
  Walter Roberson
      
      
 2016년 7월 12일
        You assigned something to a variable named size, so you will not be able to call the size() function until the variable size goes out of scope.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

