Error using horzcat Dimensions of matrices being concatenated are not consistent.

3 views (last 30 days)
The above error happens due to this line below,
utt= [a0,zeros(1,N-1)]

Answers (2)

Guillaume
Guillaume on 18 Nov 2018
Isn't the error message clear? Obviously, a0 has more than one row, hence you can't concatenate it with a one row matrix.
As we have no idea what you're doing we can't tell you what the correct fix. Possibly,
utt = [a0, zeros(size(a0, 1), N-1)]
may be the fix (it would certainly not cause an error anymore). Possibly, it's completely the wrong thing to do.

Stephan
Stephan on 18 Nov 2018
utt=[a0',zeros(1,N-1)]

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!