Hello, I am trying to evaluate the number of rows of a certain matrix 'Conn' using
d = size(Conn,1)
If I initialise the matrix from an empty workspace like this
Conn = [1 2 3; 4 5 6]
the command displays the correct answer
d = 2
When using the exact same command inside a bigger script, I get this error message:
Subscript indices must either be real positive integers or logicals.
Anybody has a clue?
Thanks.

 採用された回答

Sean de Wolski
Sean de Wolski 2013 年 12 月 17 日

0 投票

You have a variable names size.
Rename this variable and clear it.

1 件のコメント

Alessandro
Alessandro 2013 年 12 月 17 日
Looks like the most obvious answer usually is the correct one. Thank you so much, I was gonna get crazy on this!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

質問済み:

2013 年 12 月 17 日

編集済み:

2013 年 12 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by