plot curve with matlab

Hi. how can i plot this eq. to (qa-w)?
2502*cos(qa) - (6*w^2*cos(qa))/5 - (50873*w^2)/52500 + (123*w^4)/87500 - 357706/63=0
thank you

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de Mayo de 2020

0 votos

syms qa real
syms w
eqn = 2502*cos(qa) - (6*w^2*cos(qa))/5 - (50873*w^2)/52500 + (123*w^4)/87500 - 357706/63 == 0;
sol = solve(eqn);
sol = sol(isAlways(sol>0)); %4 solutions, 2 of which are complex, 1 is always negative for real qa
fplot(sol, [-pi pi])

7 comentarios

saman ahmadi
saman ahmadi el 10 de Mayo de 2020
Thank you for your answer dear Walter Roberson.
i ran sended code, but it has error. please see attachmented picture.
Walter Roberson
Walter Roberson el 10 de Mayo de 2020
Which MATLAB release are you using? When I execute the code, I get something Gaussian curve with peak 49.6 at x = 0
saman ahmadi
saman ahmadi el 10 de Mayo de 2020
I use matlab R2016a...
Walter Roberson
Walter Roberson el 10 de Mayo de 2020
Okay, I will have to install that version; it will take a bit of time.
Walter Roberson
Walter Roberson el 10 de Mayo de 2020
I just tested in R2016a, and had no problem with the code.
What shows up for
size(sol)
class(sol)
saman ahmadi
saman ahmadi el 10 de Mayo de 2020
Thanks a lot dear Walter Roberson. At where should i copy them in last code that you send me?
Walter Roberson
Walter Roberson el 10 de Mayo de 2020
Execute those in the command window after you run the code I posted earlier, and tell us what the results are. These are commands to help us debug the problem, not commands that will somehow fix the problem.

La pregunta está cerrada.

Etiquetas

Preguntada:

el 10 de Mayo de 2020

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by