I have a matrix 2x20 from a text file
I want to add a row of ones to that matrix
twopts = reshape(textread('input.txt', '%s'),2,20); % 2 by 20
ones_row = ones(1,20); %1 by 20 of ones
twopts = [twopts;ones_row]
Gives me an error:
"Error using vertcat CAT arguments dimensions are not consistent."
But the matrix dimensions match... 2x20 and 1x20 to make 3x20
What's wrong with it and how do I fix it?
size(twopts)andsize(ones_row)to make sure they are the right size?