Home > Back-end >  Excel: Combining SIN function array and RAND to add noise
Excel: Combining SIN function array and RAND to add noise

Time:08-24

As the title suggests, I would like to combine SIN function with RAND function so that it results in an imperfect SIN trend. As of right now I've got two functions:

SIN function:

=TRANSPOSE((SIN(RADIANS(ROW(INDIRECT("1:31"))*15)) 1))

RAND function:

=RAND()

As you can see, the SIN function stems from an array that is 31 cells wide. Yet I am not sure how to combine it with RAND function so that the RAND factor would apply each of these cells individually, rather than just shifting / multiplying the whole array.

This is the current state of my data:

Image

Is there a way to combine the two in one single function?

On a slightly different note, is there a way to "freeze" RAND function so that it wouldn't update after every action? (without copy pasting it as value)

CodePudding user response:

Use Randarray, where you specify 1 row and 31 columns. Formula represented in row 3...

=TRANSPOSE((SIN(RADIANS(ROW(INDIRECT("1:31"))*15)) 1)) RANDARRAY(1,31)

enter image description here

  • Related