how to solve this error ? the horzcat Dimensions of matrices being concatenated are not consistent

1 次查看(过去 30 天)
i am using of curvelet first generation code in my project. but when i call the curvelet function in main code this error appears in this section of curvelet code and main code : Error using horzcat Dimensions of matrices being concatenated are not consistent.
Error in iso_fuwt2_po (line49) x = [zeros(floor(ls/2),n) x zeros(ceil(ls/2),n)];
Error in cvt (line 36) D = iso_fuwt2_po( x, J, hr );% fine to coarse
Error in MainProposedCode(line 25) Dn=cvt(image1,5,[3 4 5 5 6]);
can someone show me how to handle and solve this error. thank you so much!
this is code in iso_fuwt2_po.m :
-------------------------------------------------
this is code in cvt.m :
  1 个评论
David Goodmanson
David Goodmanson 2017-8-23
Hi masoom, The line x = [zeros(floor(ls/2),n) x zeros(ceil(ls/2),n)]; is bound to fail when m is odd. Since floor(ls/2) and ceil(ls/2) differ, you end up trying to horizontally concatenate arrays with numbers of rows that differ.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by