Skip to main content
1-Visitor
January 7, 2015
Solved

generating random elements

  • January 7, 2015
  • 3 replies
  • 3305 views

Hello All,

Could anybody help me with this question please?

I have a matrix "M" with five elements. I want to generate 10 (for example) matrices such that each element is randomly within +/- %5 of the corresponding element of the matrix "M".

Thank you in advance

Best answer by Werner_E

PAYMAN RAJAI wrote:

Hello All,

Could anybody help me with this question please?

I have a matrix "M" with five elements. I want to generate 10 (for example) matrices such that each element is randomly within +/- %5 of the corresponding element of the matrix "M".

Thank you in advance

You may use something like this for a single value or matrix

1.png

You may also turn this procedure in a function

2.png

and use this function to create ten sets using a range variable

3.png

3 replies

23-Emerald I
January 7, 2015
payman1-VisitorAuthor
1-Visitor
January 7, 2015

Thank you very much Fred.

I can't open the file. Would you please send the file in Mathcad15?

24-Ruby III
January 12, 2015

Please find in attachment version of this document in PDF format.

Werner_E25-Diamond IAnswer
25-Diamond I
January 7, 2015

PAYMAN RAJAI wrote:

Hello All,

Could anybody help me with this question please?

I have a matrix "M" with five elements. I want to generate 10 (for example) matrices such that each element is randomly within +/- %5 of the corresponding element of the matrix "M".

Thank you in advance

You may use something like this for a single value or matrix

1.png

You may also turn this procedure in a function

2.png

and use this function to create ten sets using a range variable

3.png

23-Emerald V
January 8, 2015

Nice and Simple, Werner! The hallmark of a Good Worksheet 🙂

I'm too lazy to type out the range variable, though ...

Stuart

collab+-+15+01+08+random+variations+01.JPG

payman1-VisitorAuthor
1-Visitor
January 8, 2015

Thank you very much Werenr and Stuart. A great help