matrix dimensions must agree
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Error using ./ Matrix dimensions must agree.
Error in secure>pushbutton2_Callback (line 237) qc=tstval./stval;
5 个评论
Stephen23
2017-3-13
Please show us the exact output of these commands:
size(tstval)
size(stval)
Ganesh Hegade
2017-3-13
check size of tstval and stval
vasantha malairamar
2017-3-14
vasantha malairamar
2017-3-14
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
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
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!