%Symbolic Demo, a "word" problem.
% How old is Freke?
% Eight years ago Saskya was half as old as Freke
% In 46 years Saskya will be Freke's present age.
% Let x = Saskya's age
%     y = Freke's age

syms    x y   real

eqn1  = x-8  - (y-8)/2;
eqn2  = x + 46  - y;



[x, y] = solve([eqn1,eqn2],[x,y]);

y = double(y);

disp(['Freke is ' num2str(y) ' years old.'])





% eqn1 = 2*(x-8) - (y-8)
% 
% eqn2 = x+46   -  y
% 
% 
% [x, y] = solve([eqn1,eqn2],[x,y]);
