function main

  close all
  clear all
  clc
  format compact
  %format longG  (Use for newer versions of Matlab; longG is many decimal
  %places, shortG is about 5 or 6 decimal places.)
  format long G

  % set initial conditions and eta interval
  Y_1_0 = 1.23254;     %Y_1 is f_doubleprime - guess this one until we achieve Y_2 = 1 at "infinity" 
  Y_2_0 = 0;           %Y_2 is f_prime
  Y_3_0 = 0;           %Y_3 is f 
  
  eta_span = [0 20];

  % Solve using Runge-Kutta
  [eta,Y] = ode45( @derivatives, eta_span ,[Y_1_0 Y_2_0 Y_3_0]);

  % plot the results
  hold on;
  plot(Y(:,1), eta, '-',  'LineWidth',2, 'Color', 'red' )
  plot(Y(:,2), eta, '--', 'LineWidth',2, 'Color', 'blue' )
  plot(Y(:,3), eta, '-.', 'LineWidth',2, 'Color', 'green' )
  % axis equal; %Use this if want x and y axes to be equal scale (1 to 1)
  axis( [0 2 0 4] )
  ylabel('\bf\it\eta \rm\bf(-)')
  xlabel('\bf\itY \rmvariables \bf(-)')
  legend( '\itY_1', '\itY_2', '\itY_3' )
    
  %print results to zero in on the correct BC at eta = 0:
  eta,   Y(:,2)
  
  % Function for the derivatives
     function dYdt = derivatives(eta,Y)

     %Create an empty column vector that will be filled with the derivatives
     dYdt = zeros(3,1); 

     dYdt(1) = Y(2)*Y(2)-1-Y(3)*Y(1);
     dYdt(2) = Y(1);
     dYdt(3) = Y(2);

   end

end
