How to combine subs and solve correctly?
Afficher commentaires plus anciens
Dear MATLAB-Central,
Trying to solve the intersection of a circle (param. repr. x=C+R*(1-T^2)/(1+T^2); y=D+R*(2*T)/(1+T^2)) and an ellipse ((x-E)^2/A^2 + (y-F)^2/B^2 = 1), with given but varying positions and radii in the variables a,b,c,d,e,f, I do the following:
- syms A B C D E F R t
- Expr = (C+R*(1-(t*t))/(1+(t*t)) - E)*(C+R*(1-(t*t))/(1+(t*t)) - E)/(A*A) + (D+R*2*t/(1+(t*t)) - F)*(D+R*2*t/(1+(t*t)) - F)/(B*B);
- Expr = subs(Expr,{A,B,C,D,E,F,R},{a,b,c,d,e,f,r});
- Expr = simplify(Expr);
- solve(Expr == 1,t)
This code produces the error message: "Conversion to char from logical is not possible."
How can I solve this problem? I greatly appreciate any help suggestion.
Best regards,
Verena
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!