Commit e05ae7a1 authored by Jakob Gabriel's avatar Jakob Gabriel
Browse files

quantity.Discrete.isnan

parent 9c18d959
......@@ -1869,6 +1869,28 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
end
end % isdiag()
function result = isnan(obj, anyNan)
% isnan True for Not-a-Number.
% isnan(X) returns an array that contains true's where
% the elements of X are NaN's and false's where they are not.
%
% isnan(X, true) returns the same as any(isnan(X), 'all')
arguments
obj
anyNan = false;
end
if anyNan
result = any(isnan(obj.on()), 'all');
else
result = true(size(obj));
for it = 1 : numel(obj)
result(it) = any(isnan(obj(it).on()), 'all');
end
end
end % isnan()
function P = ztzTimes(a, b)
assert(size(a,2) == size(b,1))
......
......@@ -20,13 +20,13 @@ end
function testParser(testCase)
profile on
%profile on
d = quantity.Domain.parser('blub', 1, 'grid', 1:3, 'gridName', 'test');
a = quantity.Domain.parser('domain', d);
b = quantity.Domain.parser('blabla', 0, 'domain', a);
b = quantity.Domain.parser('blabla', 0, 'domain', a, 'blub', 'a');
profile off
profile viewer
%profile off
%profile viewer
testCase.verifyEqual(d, a);
......
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