fill a matrix from vectors

8 views (last 30 days)
kokomy
kokomy on 15 Oct 2015
Commented: Walter Roberson on 16 Oct 2015
How I can fill matrix coefficients by vectors in matlab code
  1 Comment
Jos (10584)
Jos (10584) on 16 Oct 2015
You lost me. Can you rephrase your question and provide an elaborated example of the input(s) and expected output?

Sign in to comment.

Answers (2)

Thorsten
Thorsten on 15 Oct 2015
v1 = [1 2 3];
v2 = [3 4 5];
M = [v1; v2]
  5 Comments
kokomy
kokomy on 16 Oct 2015
Thank's but if M coefficients change during the program assumed that M have (k,m)elements, we had the vectors elements then k and m change i.e take differents values for the formation of our matrix M
Walter Roberson
Walter Roberson on 16 Oct 2015
I was right, you need the link I provided about creating variables in a loop.

Sign in to comment.


Walter Roberson
Walter Roberson on 16 Oct 2015

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!