add random numbers and generate a matrix

1 visualización (últimos 30 días)
Rica
Rica el 11 de Dic. de 2012
hi! i have an array A of size (75*1). i want to generate from this array a big Matrix of size(75*75* 30) i did it in this manner
M_m=bsxfun(@plus,A,10*rand([1 3],75,30))
my problem i want to mhave not only plus but also minus. something lik this:
M_m=bsxfun(@plus,A,10*rand([1 3],75,30)*sign(randn(75,30)))
could someone help me?
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 11 de Dic. de 2012
Can you explain what do you want to get from A
Image Analyst
Image Analyst el 11 de Dic. de 2012
75 by 75 by 30 is far from big. But anyway, it seems like you want to add noise to some 3D array but I'm not sure what pattern you're going to use to build that 3D array from the column vector that is A. Please clarify.

Iniciar sesión para comentar.

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