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 Exchange에서 Creating 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