Using solve to find unknown Constant in equation

Hi, I tried to use solve in the following fashion:
if true
% code
end
syms a x C
Csolve = solve(C+pi*cos(a)+pi*i*sin(a)-C*exp^(i*a)*cos(a)-C*exp^(i*a)*i*sin(a)==0)
However, it returns "Not enough parameters"
Is there a particular missing part here?
Thanks!

 Respuesta aceptada

Torsten
Torsten el 3 de En. de 2018
Csolve = solve(C+pi*cos(a)+pi*1i*sin(a)-C*exp(1i*a)*cos(a)-C*exp(1i*a)*1i*sin(a)==0,C)
Best wishes
Torsten.

3 comentarios

Sergio Manzetti
Sergio Manzetti el 3 de En. de 2018
Editada: Sergio Manzetti el 3 de En. de 2018
Dear Torsten, I get the same on this, which is an entirely different operation:
if true
% code
end
syms a x C k
y = C*exp^(-k*x)*(cos(a*x)+i*sin(a*x)) + exp^(k*x-k)*(cos(a*(1-x))+i*sin(a*(1-x)))*(pi-C*exp^(-k)*e^(i*a));
w = diff(y, x)
Torsten
Torsten el 3 de En. de 2018
Editada: Torsten el 3 de En. de 2018
"exp^" should produce an error message, or MATLAB interprets "exp" as a variable name (though undefined in your code from above).
Best wishes
Torsten.
so it should only be exp indeed! Thanks, forgot it there.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 3 de En. de 2018

Comentada:

el 3 de En. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by