% Control1_3.m
% Solution to problem 2, Computacion I, 2017/11/03
% J.M.Soler, Oct.2017

% Set parameters
clear
a = [-25, 1, 2];
b = [ 20,-4, 2];
c = [ -4, 0, 1];

% Find solutions
[ns1,sol1] = F_SolRealEc2grado(a(1),b(1),c(1));
[ns2,sol2] = F_SolRealEc2grado(a(2),b(2),c(2));
[ns3,sol3] = F_SolRealEc2grado(a(3),b(3),c(3));

% Write solutions
fprintf('a,b,c=%3d %3d %3d. solutions= %f %f',a(1),b(1),c(1),sol1), fprintf('\n')
fprintf('a,b,c=%3d %3d %3d. solutions= %f %f',a(2),b(2),c(2),sol2), fprintf('\n')
fprintf('a,b,c=%3d %3d %3d. solutions= %f %f',a(3),b(3),c(3),sol3), fprintf('\n')
