Plot a Curve and choose random points on it
1 view (last 30 days)
Show older comments
Antonio
on 21 Nov 2013
Commented: Azzi Abdelmalek
on 21 Nov 2013
I should find a curve that: * _for each value of x ---> one or more values on y_ * . It is not necessary that i plot the curve. I have to choose randomly some points on the curve and memorize it too.
How to do it?
0 Comments
Accepted Answer
Azzi Abdelmalek
on 21 Nov 2013
Example
x=0:10
y=sin(x)
n=numel(y)
random_samples=y(randperm(n,randi(n)))
2 Comments
Azzi Abdelmalek
on 21 Nov 2013
You are asking, I think you have to give an example to explain what you want
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!