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!