Monday 15 February 2010

how to get the length (count of rows) of this matlab matrix? -


I'm fairly new to matlab and just need to change a very small thing in a code. I have the following matrix:

  ans = 1 1 2 1 2 1 2 2 2   

How to count the lines of ans? It should be 4

You should use the function:

  NRows = size (myMatrix, 1); % 1 stands for first dimension    

No comments:

Post a Comment