Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

matrix dimensions must agree

조회 수: 2 (최근 30일)
vasantha malairamar
vasantha malairamar 2017년 3월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
Error using ./ Matrix dimensions must agree.
Error in secure>pushbutton2_Callback (line 237) qc=tstval./stval;
  댓글 수: 5
vasantha malairamar
vasantha malairamar 2017년 3월 14일
we fit the first in Stile into the first in Starget, fit the second in Stile into the second in Starget , and so on.
Jan
Jan 2017년 3월 14일
@vasantha malairamar: And this can work only, if both variables have the same number of elements. But they don't. We cannot guess why and what you want to do instead. But you can explain this.

답변 (1개)

Jan
Jan 2017년 3월 13일
The error message is clear: In the expression tstval ./ stval both variables must have the same size or one is a scalar. You can examine this with the debugger. Type this in the command window:
dbstop if error
Now run your code again until Matlab stops. Now check the sizes of the variables either in the workspace browser or in the command window:
size tstval
size stval

이 질문은 마감되었습니다.

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by