MATLAB: IDWT

idwt

hi,
in idwt, there was an error while
y1=idwt(ca3+cd3);
y2=idwt(y1+cd2);
y3=idwt(y2+cd1);
the error was plus Matrix dimensions must agree. the size of y2 and cd1 differs by one. that is y2 size 252 and cd1 size 251.
how can eliminate that error. suppose if we want increase the size of 251 to 252. then what procedure i have to follow.
thank u in advance

Best Answer

Well, you could do
cd1(252) = NaN
and then the sizes would agree. The final element of the result would then be NaN as well, which is probably a good reminder that it is not well defined to add two vectors of different sizes.