using solve for 2 equations and 2 unknowns

1 view (last 30 days)
Michael Lewis
Michael Lewis on 13 May 2015
Commented: Torsten on 13 May 2015
using solve for 2 equations and 2 unknowns C and D
S=solve(['(x0+(b/a))^2+(y0+(D/a))^2=(C^2/(a)^2)',... '(x1+(b/a))^2+(y1+(D/a))^2=(C^2/(a)^2)'],['C','D']);

Answers (1)

Torsten
Torsten on 13 May 2015
ok, and what's your question ?
Best wishes
Torsten.
  2 Comments
Michael Lewis
Michael Lewis on 13 May 2015
Sorry,
syms C D S=solve(['(x0+(b/a))^2+(y0+(D/a))^2=(C^2/(a)^2)',... '(x1+(b/a))^2+(y1+(D/a))^2=(C^2/(a)^2)'],['C','D']);
I wanted to solve for C and D in the equations. All the other variables are parameters. They define two points (x0,y0)and (x1,y1) on a curve with radius C^2/a^2 and centre (D/a, b/a) where b and a are known. How do I do it!
Torsten
Torsten on 13 May 2015
syms C D x0 y0 a b
[solC,solD]=solve([(x0+b/a)^2+(y0+D/a)^2==C^2/a^2,(x1+b/a)^2+(y1+D/a)^2==C^2/a^2],[C,D])
does not work ?
Best wishes
Torsten.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!