Bonjour,
Je besoin de tracer une figure qui contient 20 points randomisées dans une area [-100 100]. Je veux obtenir cette figure 10^6 càd 10^6 figures, chacune contient 20 points. pourriez vous m'aider,j'essaye d’utiliser la syntaxe rand(n)
merci
set(gca,'xtick',-100:20:100);
set(gca,'ytick',-100:20:100);
axis([-100 100 -100 100]);
grid

3 件のコメント

Image Analyst
Image Analyst 2016 年 12 月 27 日
Google Translation:
Good morning,
I need to draw a figure that contains 20 randomized points in an area [-100 100]. I want to get this figure 10 ^ 6 càd 10 ^ 6 figures, each contains 20 points. Could you help me? I am trying to use the syntax rand(n).
Thank you
set(gca,'xtick',-100:20:100);
set(gca,'ytick',-100:20:100);
axis([-100 100 -100 100]);
grid
Image Analyst
Image Analyst 2016 年 12 月 27 日
What does "I want to get this figure 10 ^ 6 càd 10 ^ 6 figures" mean? How many figures do you want to create with 20 points each in them? And don't say an array of a million by a million figures. You can't fit a billion figures on your screen.
Marwen Tarhouni
Marwen Tarhouni 2016 年 12 月 27 日
編集済み: Marwen Tarhouni 2016 年 12 月 30 日
je veux exécuter plusieurs fois l'algorithme pour obtenir plusieurs scénarios c'est à dire l'emplacement des points chaque exécution se change

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

 採用された回答

Image Analyst
Image Analyst 2016 年 12 月 27 日

0 投票

How about this:
x = 200 * rand(1,20) - 100;
y = 200 * rand(1,20) - 100;
plot(x, y, 'b*');
grid on;

1 件のコメント

Marwen Tarhouni
Marwen Tarhouni 2016 年 12 月 27 日
編集済み: Marwen Tarhouni 2016 年 12 月 30 日
merci

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by