Clear Filters
Clear Filters

I am very new to Matlab and I am trying to graph y'=ky, y(0) = A. Can anyone assist?

1 view (last 30 days)
I am very new to Matlab and I am trying to graph y'=ky, y(0) = A.
Can anyone assist?

Accepted Answer

Walter Roberson
Walter Roberson on 24 Jun 2018
syms y(t) k A
Y = dsolve(diff(y)==k*y,y(0)==A);
YY = subs(Y, [A,k], [randn()*50,randn()/2]);
fplot(YY, [-10 10])
  4 Comments
JB
JB on 30 Jun 2018
For anyone reviewing this question and would like to get the latest update installation please visit the link here:
V/R jb
JB
JB on 30 Jun 2018
@Steven_Lord: The recent update worked well.
@Walter_Roberson: Your code worked perfectly after I installed the latest update.
Thank you both. V/R jb

Sign in to comment.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing 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!