MATLAB: A question related to subs in ode (symbolic maths toolbox)

MATLABodesubssymbolicSymbolic Math Toolboxsymbolic maths toolbox

I have a line:
ode=diff(y,x)==x+y;
I want matlab to calculate diff(a,b), given a and b are real numerical values. However, the subs function allowed me only to either sub the value a or value b into the ode line, can anyone help?
I am expecting something like subs(ode,[x,1,y,2]) would give me 3, subs(ode,[x,4,y,5]) would give me 9.

Best Answer

I am not sure what you are asking for perhaps an example below?:
>> syms x y
>> eqn = x+2*y
eqn =
x + 2*y
>> subs(eqn,{x,y},{2,5})
ans =
12
>>