add random numbers and generate a matrix

1 Ansicht (letzte 30 Tage)
Rica
Rica am 11 Dez. 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 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 11 Dez. 2012
Can you explain what do you want to get from A
Image Analyst
Image Analyst am 11 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by