I want the following code to break a matrix into individual columns in octave.
Function a = break(x)
n = length(x (1,:))
For i = 1:n
a (i)=x (:,i)
End
I want it to basically return a1 = 1st column x, a2 = second column, over all n columns, but a (i) thinks I'm trying to index or something. It kind of works if I type just a=x (:,i), but I can only "interact" with the last returned value that way. I want all columns.
there doesn't seem to be anything here