Error in appliying split apply
2 ビュー (過去 30 日間)
古いコメントを表示
I keep getting this error but I checked my code again and again and can't find anything.
Error using vertcat Dimensions of matrices being concatenated are not consistent.
Error in splitapply>localapply (line 253) finalOut{curVar} = vertcat(funOut{:,curVar});
Error in splitapply (line 132) varargout = localapply(fun,splitData,gdim,nargout);
Could anyone tell me why this is happening?
2 件のコメント
Jan
2022 年 5 月 17 日
An answer requires to know, what your inputs are. It is impossible to fix a problem without seeing your code.
回答 (1 件)
Walter Roberson
2022 年 5 月 17 日
Sometimes the cause of this is having used a function such as max() that operates along the first non-scalar dimension, together with a group that turns out to only have one row. When you use splitapply() with functions that operate along the first non-scalar dimension, you should be sure to specify the dimension to operate on.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!