Error using horzcat Dimensions of arrays being concatenated are not consistent

2 次查看(过去 30 天)
Dear,
I have a program but When I run it, an error occurs:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in (line 34)
H1_modified = [H1 extra_cols];
How can I fix this error please ?
  5 个评论
Afluo Raoual
Afluo Raoual 2023-5-3
@Dyuman Joshi We can't specify the final size of H1_modified because the size depends on the code rate. For example H1 is always square, and it depends on the value of m. Then, we add columns to this square matrix H1 in order to get the final matrix H1_modified which must be regular with the desired code rate.
Dyuman Joshi
Dyuman Joshi 2023-5-3
"We can't specify the final size of H1_modified because the size depends on the code rate."
Then what is the relation of final size of H1 with code rate?

请先登录,再进行评论。

回答(1 个)

Jon
Jon 2023-5-2
On line 34 H1 has m*(m-1) rows, but extra_cols only has m rows. So you can not horizontally concatenate H1 and extra_cols using
H1_modified = [H1 extra_cols];

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by