I need help randomizing the points of the traingle

1 vue (au cours des 30 derniers jours)
Amanda
Amanda le 28 Nov 2022
Modifié(e) : Voss le 28 Nov 2022
I need help radomizing the points of the triangle just like the color/markersize/edgecolor change.
  3 commentaires
Amanda
Amanda le 28 Nov 2022
there arent any constraints
Voss
Voss le 28 Nov 2022
Modifié(e) : Voss le 28 Nov 2022

Connectez-vous pour commenter.

Réponses (1)

David Hill
David Hill le 28 Nov 2022
figure;hold on;
for k=1:10
p=polyshape(rand(3,1),rand(3,1));
plot(p)
end
  2 commentaires
Amanda
Amanda le 28 Nov 2022
I dont want mulitple triangle on the graph I want it to randomize one triangle
Torsten
Torsten le 28 Nov 2022
Modifié(e) : Torsten le 28 Nov 2022
And what does it mean: "randomize one triangle" ?
According to how a normal person would interprete it, you already did this in your code: You randomly chose 3 points in 2d space (most probably meant as the corner points of a triangle).
Or do you need random points inside a fixed triangle ?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by