Info
This question is closed. Reopen it to edit or answer.
(R2010a) INTERP3 vertcat error, CAT arguments dimensions are not consistent.
1 view (last 30 days)
Show older comments
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...
3 Comments
Answers (0)
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!