MATLAB Answers

i have a datset name as dec_table (150,5) and a new_att(150,1) and i want to combine these two to make new_dec_table?

1 view (last 30 days)
vinay kumar maddhesia
vinay kumar maddhesia on 29 Oct 2019
Edited: Sai Bhargav Avula on 29 Oct 2019
new_dec_table = cat(2,new_att,dec_table);
error:
Error using cat
Dimensions of matrices being
concatenated are not consistent.
Error in iris_rough3 (line 41)
new_dec_table =
cat(2,new_att,dec_table);

  0 Comments

Sign in to comment.

Answers (1)

Sai Bhargav Avula
Sai Bhargav Avula on 29 Oct 2019
Edited: Sai Bhargav Avula on 29 Oct 2019
Hi, In your case horzcat would work.
Try
new_dec_table = horzcat(new_att,dec_table)
This would concatenate horizontally as your data has row consistency

  0 Comments

Sign in to comment.


Translated by