Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LRT_infinite_dimensional_systems
conI
Commits
6f211672
Commit
6f211672
authored
Oct 08, 2020
by
Jakob Gabriel
Browse files
quantity.example: language in the comments
parent
c061b3fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
+quantity/example.m
View file @
6f211672
%% example.m gives an overview of basic mathematical operations
% using quantity.Discrete class
%% example.m gives an overview of basic mathematical operations using the quantity.Discrete class
%% Create a new quantity
% First, we want to create a scalar function a(z) = 1 + z that depends on a spatial variable
...
...
@@ -160,21 +159,22 @@ y = x + cumInt(K*x.subs("z", "zeta"), "zeta", 0, "z");
y
.
plot
();
%% plotting of quantities
% As have been shown, quantities can be displayed by the plot method. For each quantity a new window
% is opened and each entry of a matrix valued quantity is plotted into a own subplot. To specifiy
% which figure should be used for a plot the optional name-value-pair argument "fig" can be used:
% As has been shown, quantities can be displayed by the plot method. By default, for each quantity a
% new window is opened and each entry of a matrix valued quantity is plotted into a own subplot.
% To specifiy which figure should be used for a plot the optional name-value pair argument "fig" can
% be used. For instance, the following line will plot a quantity into figure number 1.
a
.
plot
(
"fig"
,
1
)
% will plot quantity a into figure 1. If a second quantity should be plotted into the same window,
% the optional name-value-pair "hold" can be used:
% If a second quantity should be plotted into the same subplot afterwards, the name-value pair
% "hold" can be used. For instance, the following plots the first derivative a_dz of a into the same
% subplot:
a_dz
.
plot
(
"fig"
,
1
,
"hold"
,
true
)
% will plot first derivative of a into the same figure.
% To use the subplot to display different quantities, use the "currentFigure" optional
% name-value-argument:
% To display different quantities in different subplots, use "subplot()" and the "currentFigure"
% name-value argument:
figure
(
1
);
clf
;
subplot
(
211
);
c
.
plot
(
"currentFigure"
,
true
);
%
w
ith
this argument
combined with the "hold" option, all entries of a matrix valued
quantity can be
% composed into one axis:
%
W
ith
"currentFigure", true
combined with the "hold" option, all entries of a matrix valued
%
quantity are
composed into one axis:
subplot
(
212
);
aaa
.
plot
(
"currentFigure"
,
true
,
"hold"
,
true
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment