randomly generate point satisfying quations

1 Ansicht (letzte 30 Tage)
zilai si
zilai si am 21 Mai 2019
Kommentiert: Star Strider am 21 Mai 2019
hello, everyone. I wonder if there is any way to randomly generate 50 points satisfying the following equaiton?
  4 Kommentare
KSSV
KSSV am 21 Mai 2019
YOu have any limit on x and y?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Alex Mcaulley
Alex Mcaulley am 21 Mai 2019
If you have symbolic toolbox:
syms x y
eqn = x.^2+(3/2*y-sqrt(abs(x)))^2 == 3;
z(x) = solve(eqn,y);
xrand = rand(1,100); %Some random numbers
yrand = cell2mat(cellfun(@double,z(xrand),'UniformOutput',false));

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by