Plot a Curve and choose random points on it

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?

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 21일

0 개 추천

Example
x=0:10
y=sin(x)
n=numel(y)
random_samples=y(randperm(n,randi(n)))

댓글 수: 2

Antonio
Antonio 2013년 11월 21일
편집: Antonio 2013년 11월 21일
but how to write a curve that for each value of x ---> more values on y? Can i have an example?
You are asking, I think you have to give an example to explain what you want

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

질문:

2013년 11월 21일

댓글:

2013년 11월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by