Commit 532c63d3 authored by Jakob Gabriel's avatar Jakob Gabriel
Browse files

quantity.Symbolic.int: if integral bounds are variables, they are always...

quantity.Symbolic.int: if integral bounds are variables, they are always considered in resulting quantity.
parent a2365056
......@@ -38,7 +38,7 @@ classdef Backstepping < handle & matlab.mixin.Copyable
% In the cases 1 and 2, the other kernel (1: kernelInverse, 2. kernel)
% can be calculated easily by calling the method invert()
myParser = misc.Parser();
myParser.addParameter('kernel', []);
addParameter(myParser, 'kernel', []);
addParameter(myParser, 'kernelInverse', []);
addParameter(myParser, 'signOfIntegralTerm', []);
addParameter(myParser, 'signOfIntegralTermInverse', []);
......
......@@ -748,6 +748,15 @@ classdef Symbolic < quantity.Function
% compute the symbolic integration
I = int(obj.sym, z{:}, a, b);
variableI = quantity.Symbolic.getVariable(I);
% avoid empty variableI:
if ischar(a) && ~any(strcmp(string(variableI(:)), a))
variableI = [variableI(:); sym(a)];
end
if ischar(b) && ~any(strcmp(string(variableI(:)), b))
variableI = [variableI(:); sym(b)];
end
% get gridName from variableI
if iscell(variableI)
gridNameI = cellfun(@(v) char(v), variableI);
else%if isvector(variableI)
......
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