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
af5f40ee
Commit
af5f40ee
authored
Dec 03, 2019
by
Ferdinand Fischer
Browse files
simplification of is empty, see
#11
parent
4ec292a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
+quantity/Discrete.m
View file @
af5f40ee
...
...
@@ -1635,19 +1635,15 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete < handle & matlab.mi
% ISEMPTY checks if the quantity object is empty
% empty = isempty(obj)
%
c
heck if there is any dimension which is zero
%
C
heck if there is any dimension which is zero
empty
=
any
(
size
(
obj
)
==
0
);
% if the constructor is called without arguments, a
% quantity.Discrete is initialized without an initialization of
% the grid. Thus, the grid is not a cell:
% If the constructor is called without arguments, a
% quantity.Discrete is created without an initialization of
% the grid. Thus, the quantity is not initialized and empty if
% the grid is not a cell.
empty
=
empty
||
~
iscell
(
obj
(
1
)
.
grid
);
% in order to check this for arrays:
% scalar and array empty check has to be separated because the
% [obj.grid] does only work in the array case.
empty
=
empty
||
any
(
cellfun
(
@
iscell
,
[
obj
.
grid
]));
end
% isempty()
function
P
=
ztzTimes
(
a
,
b
)
...
...
Ferdinand Fischer
@po59cyfi
mentioned in issue
#11 (closed)
·
Dec 03, 2019
mentioned in issue
#11 (closed)
mentioned in issue #11
Toggle commit list
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