Commit 0e13619e authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

changed output of simulation for fractional systems

The simulation for fractional systems returns now the distributed system variable as quantity.
parent 9003d24f
function [y, x] = simulate(stsp, u, optArgs)
function [y, w, x] = simulate(stsp, u, optArgs)
arguments
stsp ss;
......@@ -8,6 +8,7 @@ arguments
optArgs.stepSize (1,1) double = u(1).domain.stepSize;
optArgs.tol = 1.0e-6;
optArgs.itmax = 500;
optArgs.spatialDomain = quantity.Domain("z", linspace(0, 1, size(stsp.A, 1)));
end
......@@ -30,6 +31,7 @@ J_fun = @(t, x) stsp.A; % Jacobian matrix of f_fun, calculated by hand. It alway
[t, x] = FDE_PI1_Im_Ver_10(stsp.UserData.alpha, f_fun, J_fun, ...
optArgs.timeDomain.lower, optArgs.timeDomain.upper, optArgs.x0, optArgs.stepSize);
w = quantity.Discrete(x', [optArgs.timeDomain, optArgs.spatialDomain]);
x = quantity.Discrete(x', optArgs.timeDomain);
y = stsp.C * x + stsp.D * u;
......
function [M, K, L, P, PHI] = femMatrices(spatialDomain, optArgs)
function [M, K, L, P, PHI, dphi] = femMatrices(spatialDomain, optArgs)
%FEMMATRICES computes the discretization matrices obtained by FE-Method
% [M, K, L, P, PHI] = femMatrices(varargin) computes the matrices required
% for the approximation of a system using FEM. For instance, the rhs of a pde
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment