I don't know how to plot what answer of dsolve

5 visualizzazioni (ultimi 30 giorni)
seungyong hong
seungyong hong il 17 Mag 2019
Commentato: seungyong hong il 18 Mag 2019
I want to plot the answer of dsolve. But I can't.
syms x;
f = dsolve('D2y=-(e-k^2)*y','y(0)=1','Dy(1)=0','x');
fplot(f(x));
It isn't work. I tried syms f, f(x) and fplot f,f(x) etc...
How plot?

Risposte (1)

madhan ravi
madhan ravi il 17 Mag 2019
syms y(x)
Dy = diff(y);
D2y = diff(y,2);
k=3; % example
f = dsolve(D2y==-(exp(-k^2))*y,y(0)==1,Dy(1)==0);
fplot(f);
  1 Commento
seungyong hong
seungyong hong il 18 Mag 2019
very very thank you. I don't know 'diff' command and how to use dsolve without string equation ex) 'd2y=(1-k)y'.
sososo thank you!

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by