randomly generate point satisfying quations

hello, everyone. I wonder if there is any way to randomly generate 50 points satisfying the following equaiton?

댓글 수: 4

Rik
Rik 2019년 5월 21일
Rewrite the formula so you get y as a function of x. Then you can get random x values and get the corresponding y values.
zilai si
zilai si 2019년 5월 21일
yes, but i wonder if there are other more convinent ways...
KSSV
KSSV 2019년 5월 21일
YOu have any limit on x and y?

댓글을 달려면 로그인하십시오.

 채택된 답변

Alex Mcaulley
Alex Mcaulley 2019년 5월 21일

0 개 추천

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));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

질문:

2019년 5월 21일

댓글:

2019년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by