MATLAB Answers

I want to get the number of rows in doulble matrix but kept recieve an error

2 views (last 30 days)
Salem on 12 Jul 2016
Answered: Walter Roberson on 12 Jul 2016
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
ans =
The tpye of the variable
ans =
But with size does not work
Subscript indices must either be real positive integers or logicals.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Jul 2016
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.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!