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?
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 21 日
You are asking, I think you have to give an example to explain what you want

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by