- #1
elbarto
- 33
- 0
Hi,
I am am trying to determine the number of rows in a matrix using matlab,
I usually use
>>[rows,cols]=size(X);
>>rows
but this requires me to do the operation in 2 steps which will not work in my application.
I need to be able to determine the number of rows in one step so I can use it as a parameter in a 'while' loop.
I have tried using rows(X), but I get an error message. I haven't been able to find a solution and my code has come to a stand still. Surely there has to be a function or easy way to do this?
Thanks
Elbarto
I am am trying to determine the number of rows in a matrix using matlab,
I usually use
>>[rows,cols]=size(X);
>>rows
but this requires me to do the operation in 2 steps which will not work in my application.
I need to be able to determine the number of rows in one step so I can use it as a parameter in a 'while' loop.
I have tried using rows(X), but I get an error message. I haven't been able to find a solution and my code has come to a stand still. Surely there has to be a function or easy way to do this?
Thanks
Elbarto