Info
この質問は閉じられています。 編集または回答するには再度開いてください。
(R2010a) INTERP3 vertcat error, CAT arguments dimensions are not consistent.
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all, when I was trying to use CONEPLOT function I got this error in an inner INTERP3 function:
??? Error using ==> vertcat CAT arguments dimensions are not consistent.
Error in ==> interp3 at 204
[~,i] = sort([zz;zzi]);
Error in ==> slice at 104
vi = interp3(x,y,z,v,xi,yi,zi,method);
The strange thing was that it worked for some specific combination of CONEPLOT input arguments, so this error showed up only for certain sizes of input arguments.
I tried to trace the problem and seems to solved it by "repairing" following line in a INTERP3 code.
INTERP3.m > original line 149:
xx = x(1,:,1).'; yy = y(:,1,1); zz = squeeze(z(1,1,:)); % columns
It seems that in this case the SQUEEZE function returns a row vector (1xN) zz while xx and yy are column vectors (Nx1), which cause this error in above-mentioned line 204.
Don't know if the main problem is somewhere else, I "repair" it by adding .' after SQUEEZE function
zz = squeeze(z(1,1,:)).';
As I mentioned in the title, I'm using MATLAB R2010a, I didn't test it for any other versions. However, it is possible that this "correction" cause more problems than benefits :-)
Have someone been faced with this problem? Could you test it?
Hope it helps...
Thanks, Adam
PS: I use the CONEPLOT function according to the example described in the Help (coneplot). The problem has happened for certain combination of input matrix sizes...
回答 (0 件)
この質問は閉じられています。
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!