Hello everyone ,
I am really bemused.
Size is not working anymore and keeps sending an error message even for basic algorithms !
For instance :
A = rand(2,3,4,5);
sz = size(A)
Array indices must be positive integers or logical values.
Error in Untitled4 (line 2)
sz = size(A)
Or even
A= [1 2 3]
sz= size(A)
Index exceeds the number of array elements (2).
Error in Untitled4 (line 2)
sz= size(A)
Help plz .
Thx in advance

답변 (1개)

madhan ravi
madhan ravi 2020년 6월 2일

3 개 추천

clear all
clear size % this is what happens when you name a variable same as the function name ;)

댓글 수: 1

jad aoun
jad aoun 2020년 6월 3일
thank you so much . stupid mistake indeed.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2020년 6월 2일

댓글:

2020년 6월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by