Do it the same way the examples for ode45 do it in the doc. Let your state vector be two elements with
y(1) = your original y
y(2) = your original v
Then you can have a function handle as follows:
dy = @(y) [y(2);E*y(1)];
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!