Link to home
Start Free TrialLog in
Avatar of Laszlo Benedek
Laszlo BenedekFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Can you make symbolic calculations on a function defined numerically? (Matlab)

Let's say I already have a function like this
function Result = z(x, y)
Result=-x*y;

Open in new window

Given that function I want to solve this ODE. (the RHS comes from that function)
>> dsolve('Dy=-x*y','y(0)=2','x')
ans =
2*exp(-x^2/2)

Open in new window

However I don't want to update the second bit of code every time the first changes. I was wondering if there's a way for the result to be automatically updated.
ASKER CERTIFIED SOLUTION
Avatar of Laszlo Benedek
Laszlo Benedek
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial