tausys
Lanczos' tau method for system of linear ODEs.
Syntax
a = tausys(x, y, ode_system, conditions, varargin)
Description
a = tausys(varargin) returns the coefficients, on basis P, of the
(n-1)th degree polinomial approximation yn = Pa, of the
linear differential system dy/dx=F(t,y). Similar to
tauode but for systems of odes.
Inputs (required)
x = independent tau variable (itau object).
y = dependent tau variable (dtau oject).
ode_system = system of odes (cell of char).
conditions = problem conditions (cell of char).
Inputs (optional)
exact_solution = exact solution (cell of char).
step = step on the x vector to show the results.
precond = preconditioner ('no', 'ilu', 'diag').
for 'ndiad' define: 'numbd' (number od diagonals);
for 'ilu' define: 'milu', 'typeilu', 'droptol',
'thresh' and 'udiag'
solver = linear system solver.
apsol = boolean varargin to show graphically the solution.
resid = boolean varargin to show graphically the error.
coeff = boolean varargin to show the coefficients a.
spy = boolean varargin to spy the T matrix.
saves = name varargin to save the results at .mat.
Output
a = approximate solution coefficients at basis P.
Example
[x, y] = tau('LegendreP', [-1 1], 10);
a = tausys(x, y, {'diff(y2)+x^1*y1-y2 = 4*x^3-11*x^1+8*x^0'; ...
'diff(y1)-y2 = 0'}, {'y1(-.5)=-2';'y2(-.5)=-4'});
See also
tau, taupw, tausyspw and schursolver.
a = tausys(varargin) returns the coefficients, on basis P, of the (n-1)th degree polinomial approximation yn = Pa, of the linear differential system dy/dx=F(t,y). Similar to tauode but for systems of odes.
Inputs (required)
x = independent tau variable (itau object).
y = dependent tau variable (dtau oject).
ode_system = system of odes (cell of char).
conditions = problem conditions (cell of char).
Inputs (optional)
exact_solution = exact solution (cell of char).
step = step on the x vector to show the results.
precond = preconditioner ('no', 'ilu', 'diag').
for 'ndiad' define: 'numbd' (number od diagonals);
for 'ilu' define: 'milu', 'typeilu', 'droptol',
'thresh' and 'udiag'
solver = linear system solver.
apsol = boolean varargin to show graphically the solution.
resid = boolean varargin to show graphically the error.
coeff = boolean varargin to show the coefficients a.
spy = boolean varargin to spy the T matrix.
saves = name varargin to save the results at .mat.
Output
a = approximate solution coefficients at basis P.
Example
[x, y] = tau('LegendreP', [-1 1], 10);
a = tausys(x, y, {'diff(y2)+x^1*y1-y2 = 4*x^3-11*x^1+8*x^0'; ...
'diff(y1)-y2 = 0'}, {'y1(-.5)=-2';'y2(-.5)=-4'});
See also
tau, taupw, tausyspw and schursolver.
exact_solution = exact solution (cell of char). step = step on the x vector to show the results. precond = preconditioner ('no', 'ilu', 'diag'). for 'ndiad' define: 'numbd' (number od diagonals); for 'ilu' define: 'milu', 'typeilu', 'droptol', 'thresh' and 'udiag' solver = linear system solver. apsol = boolean varargin to show graphically the solution. resid = boolean varargin to show graphically the error. coeff = boolean varargin to show the coefficients a. spy = boolean varargin to spy the T matrix. saves = name varargin to save the results at .mat.
Output
a = approximate solution coefficients at basis P.
Example
[x, y] = tau('LegendreP', [-1 1], 10);
a = tausys(x, y, {'diff(y2)+x^1*y1-y2 = 4*x^3-11*x^1+8*x^0'; ...
'diff(y1)-y2 = 0'}, {'y1(-.5)=-2';'y2(-.5)=-4'});
See also
tau, taupw, tausyspw and schursolver.
[x, y] = tau('LegendreP', [-1 1], 10); a = tausys(x, y, {'diff(y2)+x^1*y1-y2 = 4*x^3-11*x^1+8*x^0'; ... 'diff(y1)-y2 = 0'}, {'y1(-.5)=-2';'y2(-.5)=-4'});