Which function will tell me how many rows and columns in matrix?
    5 次查看(过去 30 天)
  
       显示 更早的评论
    
How would I be able to write row(A) and it would output the number of rows in matrix A?
What function should I use and write? Same with columns?
Thanks.
0 个评论
回答(1 个)
  Image Analyst
      
      
 2014-5-18
        
      编辑:Image Analyst
      
      
 2014-5-18
  
      theDimensionSizes = size(A);
numDims = ndims(A);
for d = 1 : numDims
    fprintf('Dimension #%d is %d long.\n', k, theDimensionSizes(k));
end
0 个评论
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

