I am trying to insert a value into Matlab vector like this:
P = [ P(1:pos) point P(pos+1:end-1) ];
Yet I keep getting this error:
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
Error in ==> main at 65
P = [ P(1:pos) point P(pos+1:end-1) ];
There is end-1 because I red that error above have something to do with arrays limits mismatch.
P.S. I know that value insertion into arrays is pretty common issue yet this seams to be the simplest way to do it and I really would like to understand why it would not work.