function prsys ( adiag, aleft, arite, f, nu ) %% PRSYS prints out the tridiagonal linear system to be solved. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 09 November 2006 % % Author: % % MATLAB version by John Burkardt % % Parameters: % % Input, real ADIAG(NU), ALEFT(NU), ARITE(NU), % the diagonal, left and right entries of the equations. % % Input, real F(NU), the right hand side of the linear % system to be solved. % % Input, integer NU. % NU is the number of equations to be solved. % fprintf ( 1, '\n' ); fprintf ( 1, 'Printout of tridiagonal linear system:\n' ); fprintf ( 1, '\n' ); fprintf ( 1, 'Equation ALEFT ADIAG ARITE RHS\n' ); fprintf ( 1, '\n' ); for i = 1 : nu if ( i == 1 ) fprintf ( 1, '%3d %12f %12f %12f\n', ... i, adiag(i), arite(i), f(i) ) elseif ( i < nu ) fprintf ( 1, '%3d %12f %12f %12f %12f\n', ... i, aleft(i), adiag(i), arite(i), f(i) ); else fprintf ( 1, '%3d %12f %12f %12f\n', ... i, aleft(i), adiag(i), f(i) ); end end return end