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

i have a vector, z which size is 1 by m.

z = [1 2 3 4 5 6 7 8]

then i want to make a matrix with m by m

Z= [z; z; z; z; z; z; z; z]

if m become bigger i couldn't do it like mentioned above. how could i generate the matrix by a single command?

thank you in advance.

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

Join Physics Forums Today!

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

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

# Creating m by m matrix in matlab

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