size 関数がうまく動かない

>> size(Smear)
Subscript indices must either be real positive integers or logicals.
と出ます。ところで、
>> whos
Name Size Bytes Class Attributes
Smear 18486x1 147888 double
とも出ます。size()が失敗している原因は何でしょう?

1 Kommentar

michio
michio am 24 Jul. 2018
コード表示部分編集しました。

Melden Sie sich an, um zu kommentieren.

Antworten (1)

michio
michio am 24 Jul. 2018

0 Stimmen

同名の変数、もしくは自作の関数が存在し、意図されている size 関数が認識されていないのかもしれません。
which -all size
の実行を試していただけますか?手元の環境ですと
>> which -all size
built-in (C:\Program Files\MATLAB\R2018a\toolbox\matlab\elmat\size)
が先頭で、C:\Program Files 以下のファイルなどが並びますが、ここで size という変数が定義されている場合には
>> which -all size
size is a variable.
が先頭に表示されるかと。

Kategorien

Mehr zu Data Import and Analysis finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2016a

Gefragt:

am 23 Jul. 2018

Beantwortet:

am 24 Jul. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by