error in indexing mode
Show older comments
hi, i wanna size of a matrix but below error happens:
Indexing cannot yield multiple results.
Error in Untitle222d2 (line 2)
[N,M]=size(V)
OR
V =
1.0350 0.9710 0.9680
Subscript indices must either be real positive integers or logicals.
Error in Untitle222d2 (line 2)
N=size(V)
what does this means.
Answers (2)
Walter Roberson
on 26 Nov 2021
1 vote
You accidentally created a variable named "size"
V= [ 1.0350 0.9710 0.9680]
[numRows,numCols] = size(V)
N=size(V)
Working fine. You have some other query can you elaborate more please.
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!