Divide plane into two separate planes
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Christine Husni
am 15 Jan. 2020
Kommentiert: Christine Husni
am 27 Jan. 2020
Hello,
I am trying to plot random points in different areas of a plane (similar to the picture below). How can I divide the plane into different regions where i can randomly plot a different amount of points in each side?
Thank you for you help,
Christine
0 Kommentare
Akzeptierte Antwort
Matt J
am 15 Jan. 2020
Bearbeitet: Matt J
am 15 Jan. 2020
Let b1 and b2 be basis vectors for the plane and let x0 be a point in the plane. Then, for example,
x0(:) + b1(:)*randn(1,N) + b2(:)*abs(randn(1,N));
will result in N random points on one side of the dividing line x0+t*b1 (the one passing through x0 and parallel to b1), while
x0(:) + b1(:)*randn(1,M) - b2(:)*abs(randn(1,M));
will result in M points on the opposite side.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Denoising and Compression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!