how to make a matrix

5 views (last 30 days)
Malek Drira
Malek Drira on 14 Oct 2020
Answered: Walter Roberson on 14 Oct 2020
hallo,
i have a vector V = (a1, a2, ....., a5000) and i want to make a matix (2*2*5000) with the values [(a1 a1
a1 a1); ....... ;(a5000 a5000 a5000 a5000)]?
thanks

Answers (1)

Walter Roberson
Walter Roberson on 14 Oct 2020
repmat(reshape(V, 1, 1, []), 2, 2, 1)

Categories

Find more on 3-D Scene Control 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!