Writing a matrix as column vectors
49 views (last 30 days)
Hello! If I have a m x n matrix Y, how do I represent it in matlab as Y = [y1, ...., yn], where y1,...., yn are column vectors?
Is it Y = [y1:yn] ? But then, how do I define the column vectors so that matlab recognizes it?
Kevin Holst on 19 Jun 2012
If Y is a workspace variable that is an m x n matrix, then you can extract the column vectors by: y1 = Y(:,1); etc. Is that what you're trying to do?
Walter Roberson on 19 Jun 2012
You asked about this before. The answer is "Please don't do that!" http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F
And please do not delete your Questions once someone has answered them. You can edit a Question for clarification, but please do not delete it. For example, the information I posted about the possibilities of the symbolic toolbox was potentially of use to other people.