add random numbers and generate a matrix

1 view (last 30 days)
Rica
Rica on 11 Dec 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 Comments
Azzi Abdelmalek
Azzi Abdelmalek on 11 Dec 2012
Can you explain what do you want to get from A
Image Analyst
Image Analyst on 11 Dec 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.

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices 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!