Random Matrix creation from the elements of a given vector

2 visualizaciones (últimos 30 días)
Rajkumar Verma
Rajkumar Verma el 21 de Mayo de 2024
Comentada: Voss el 23 de Mayo de 2024
Dear all,
I have a vector A containing the elements [EI, VI, I, SI, M, SS, S, VS, ES]. I want to create a 7x20 random matrix using the elements from vector A. How can I do this?

Respuesta aceptada

Voss
Voss el 21 de Mayo de 2024
M = A(randi(numel(A),7,20));
  8 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by