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

5 Ansichten (letzte 30 Tage)
seungyong hong
seungyong hong am 17 Mai 2019
Kommentiert: seungyong hong am 18 Mai 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?

Antworten (1)

madhan ravi
madhan ravi am 17 Mai 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 Kommentar
seungyong hong
seungyong hong am 18 Mai 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!

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by