Graphing of Partial Differential Equation
Afficher commentaires plus anciens
My code is simple and as a below:
d=0.25*log(1.75); e=d/(sqrt(4*(pi()^2)+d^2)); wd=16*pi(); wn=wd/sqrt(1-e^2); x0=1.75; t=0:0.1:2; x=x0*exp(-e*wn*t)*(cos(wd*t)+(e*wn/wd)*sin(wd*t)); plot(t,x)
For some reason the function isn't getting plotted i get an undefined error in the 7th line. The funny thing is when i replace the "*" before the cos, with a "+" the code seems to work and I get a graph. I can't figure what the problem is here. Help will be much appreciated this is my first post so apologies for any mistakes/inconveniences. Thanks in advance
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur PDE Solvers 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!