why am i getting this error "Subscript indices must either be real positive integers or logicals."

1 回表示 (過去 30 日間)
hi i have a vector called pts1 and i want to get the size of this vector using command "size(pts1,2)" but i get an error in matlab "Subscript indices must either be real positive integers or logicals." how can i fix it? thx

採用された回答

Adam
Adam 2016 年 12 月 16 日
Are you sure that is exactly the code that is giving you the error. I can't see how that exact code could possibly give that error, assuming you typed in the 2 literally rather than acquiring it as the result of some process.
The only other thing that comes to mind is if you have overwritten the size function with a variable.
What does
which size
return?
  1 件のコメント
quada loupi
quada loupi 2016 年 12 月 16 日
thx its was very stupid error in my workspace i have a variable called size and i forget to delete it

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by