How to write the following equation using matlab
7 views (last 30 days)
Show older comments
Hi I would like to know how i should write the following equation in matlab. The equation will be used to sketch a graph but the correct graph is not being sketched and i feel like it has something to do with the way I wrote the equation. Could anyone please help me out
Answers (1)
Walter Roberson
on 21 Sep 2022
syms U L C R t
h(t) = 2*sin(sqrt(U*L - C*R^2)/(L*sqrt(2*L))*t) / (sqrt(C)*sqrt(4*L-C*R^2)) * exp(-t*(R/2*L))
Unfortunately you have to look very closely to see that the exponent is negative; I will remind Mathworks again that the negative exponent needs to be more clear.
You would need specific numeric values for C L R U in order to be able to plot this.
7 Comments
Sam Chak
on 24 Sep 2022
Jadida, I'd suggest you show us the ordinary differential equation of RLC circuit.
We can probably use dsolve to verify if the analytical solution is the same as the equation provided by you.
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!