Commit 58354f82 authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

some minor bug fixes

parent 1e485c8f
......@@ -597,7 +597,7 @@ classdef Symbolic < quantity.Function
else
try
% try to compute the symbolic integration
I = quantity.Symbolic(int(obj.sym, domainName.name, lowerBound, upperBound), obj(1).domain);
I = quantity.Symbolic(int(obj.sym, domainName.name), obj(1).domain);
C = subs(I, domainName.name, upperBound) - ...
subs(I, domainName.name, lowerBound);
......
......@@ -500,7 +500,7 @@ classdef (InferiorClasses = {?quantity.Discrete, ?quantity.Function, ?quantity.S
% compute the integration of the fundamental matrix with the temporal
% values:
% Phi_k(z) = int_0_z Phi_0(z, zeta) * M(zeta) d_zeta
Phi(:, :, k) = cumInt(F0 * sumPhi.subs("z", "zeta"), "zeta", z(1), "z");
Phi(:, :, k) = cumInt(F0 * sumPhi.subs("z", "zeta"), "zeta", z(1).lower, "z");
end
%
pbar.stop();
......
......@@ -392,7 +392,6 @@ end
function testCumInt(testCase)
tGrid = linspace(pi, 1.1*pi, 51)';
sGrid = tGrid;
s = sym("s");
t = sym("t");
......@@ -402,11 +401,11 @@ b = [ s; 2*s];
%% int_0_t a(t,s) * b(s) ds
% compute symbolic version of the volterra integral
myDomain(1) = quantity.Domain("t", tGrid);
myDomain(2) = quantity.Domain("s", sGrid);
myDomain(2) = quantity.Domain("s", tGrid);
integrandSymbolic = quantity.Symbolic(a*b, myDomain);
integrandDiscrete = quantity.Discrete(integrandSymbolic);
V = cumInt(integrandSymbolic, "s", tGrid(1), "t");
f = cumInt(integrandDiscrete, "s", sGrid(1), "t");
f = cumInt(integrandDiscrete, "s", tGrid(1), "t");
testCase.verifyEqual(V.on(), f.on(), "AbsTol", 1e-5);
......
......@@ -114,7 +114,8 @@ A1 = quantity.Symbolic([0 1; 0 0], z);
A = signals.PolynomialOperator({A0, A1});
B = signals.PolynomialOperator(quantity.Symbolic([-1 -1; 0 0], z));
[Phi1, Psi1] = A.stateTransitionMatrix("N", N, "B", B);
[Phi1, F0] = A.stateTransitionMatrix("N", N);
Psi1 = A.inputTransitionMatrix(B, F0, "N", N);
[Phi2, Psi2] = A.stateTransitionMatrixByOdeSystem("N", N, "B", B);
testCase.verifyEqual(double(Phi1), double(Phi2), 'AbsTol', 1e-2);
......
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