Info
此问题已关闭。 请重新打开它进行编辑或回答。
??? Subscripted assignment dimension mismatch. Error
1 次查看(过去 30 天)
显示 更早的评论
Hi so Im getting this error when ever I try to run this section of code:
for i = 1:l
C2(i,1) = min ( G1(i,Xbp: Xep+3));
end
C2 is a 616x1 matrix G1 is a 616x498 matrix
Why is this occuring all of a sudden I have ran this code on similar programs and this is teh first time it occured.
Thanks.
回答(1 个)
dpb
2014-5-26
Insufficient info to tell -- the problem would appear to be in what isn't shown.
Use debugger to stop on the error and examine the specific case values. Set
dbstop if error
then rerun.
The above code loop could be written as
C2=min(G1(:,G1(i,Xbp: Xep+3),2);
presuming that
I=size(G1,1);
If I<size(G1,1) then substitute the vector 1:I for I in the first subscript expression.
4 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!