Hello,
I have a matrix x of this form (these are example values)
1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 1
I am trying to make a number out of each row so I used
y=strcat(num2str(x(:,1)),num2str(x(:,2)),num2str(x(:,3)),num2str(x(:,4)),num2str(x(:,5)));
which get me the result
'10011''01000''00001''10011'
Now I want to convert each string to a number but its not working.
A = str2num(y)A = []
Also, I tried different method all faild beause the size of y is 4×5 and not 4×1.
why does matlab consider each char as column and how can I avoid this problem?
Thanks
Best Answer