Filter löschen
Filter löschen

RandomPoints plot &scatter

2 Ansichten (letzte 30 Tage)
Marwen Tarhouni
Marwen Tarhouni am 27 Dez. 2016
Bearbeitet: Marwen Tarhouni am 30 Dez. 2016
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 Kommentare
Image Analyst
Image Analyst am 27 Dez. 2016
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 am 27 Dez. 2016
Bearbeitet: Marwen Tarhouni am 30 Dez. 2016
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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 27 Dez. 2016
How about this:
x = 200 * rand(1,20) - 100;
y = 200 * rand(1,20) - 100;
plot(x, y, 'b*');
grid on;

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by