add random numbers and generate a matrix

1 次查看(过去 30 天)
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 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2012-12-11
Can you explain what do you want to get from A
Image Analyst
Image Analyst 2012-12-11
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by