How to generate noise signal with desired max and min signal?
Show older comments
Hello Guys,
I want to ask about, how to generate noise signal with a desired max and min amplitude?. For example, I want to generate noise signal with max 4 and min 2 just like this figure.
Thank you

Accepted Answer
More Answers (1)
You can use tha rand() function to get a random noise signal in range of (a,b) by writing the expression: a+(b-a)*rand(size(x)).
x = linspace(0,1000,1000);
plot(2+2*rand(size(x)))
To undesrtand more about the rand() function, read the following documentation:
1 Comment
Sabella Huang
on 7 Jul 2022
Categories
Find more on Matrices and Arrays 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!
