MATLAB: How to combine subs and solve correctly

MATLABsolvesubs

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

Best Answer

The ability to use "==" in solve() was introduced in R2012a. If you are using an earlier version you will have to change your last line to
solve(Expr - 1, t)