Error - Subscript indices must either be real positive integers or logicals ??

1 回表示 (過去 30 日間)
Yugal Gupta
Yugal Gupta 2017 年 6 月 5 日
回答済み: the cyclist 2017 年 6 月 5 日
sym(zeros(4, 1));
is showing an error "Subscript indices must either be real positive integers or logicals". What may be the reason behind this error? How it can be resolved ??
  1 件のコメント
KSSV
KSSV 2017 年 6 月 5 日
Try
A = zeros(4,1) ;
B = sym(A) ;
What version you are using?

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

回答 (1 件)

the cyclist
the cyclist 2017 年 6 月 5 日
Is it possible that you have defined a variable named sym, and you are trying to index into that? What does the command
which sym
give?
If that gives a variable name, that's presumably the problem. Remember not to use variable names that are MATLAB keywords.

Community Treasure Hunt

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

Start Hunting!

Translated by