Hallo,(adsbygoogle = window.adsbygoogle || []).push({});

I have a 3*3 matrices in matlab:

A=[ 1 2 3; 4 5 6; 7 8 9];

and i wont to accept a vector from each colume in an easy way, i.e.

a1=1 2 3 , a2=4 5 6 , a3=7 8 9

so i tried to wrote:

for i=1:3

a_i=A(:,i);

end

but i only the last vector, a3=7 8 9...

if anyone have a good suggestion it would be very helpful.

thnks

Omri

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Vectors in matlab

Loading...

Similar Threads for Vectors matlab |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

Mathematica Looping through vectorized functions for a piecewise solution |

MATLAB MATLAB vector multiplication |

**Physics Forums | Science Articles, Homework Help, Discussion**