mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Matlab] Add named constructors for functors
This commit is contained in:
parent
21980e6e6f
commit
71fc640f56
5
interfaces/matlab_experimental/Func/fplus.m
Normal file
5
interfaces/matlab_experimental/Func/fplus.m
Normal file
@ -0,0 +1,5 @@
|
||||
function r = fplus(a, b)
|
||||
% Get a functor representing the sum two input functors 'a' and
|
||||
% 'b'.
|
||||
r = Func('sum', a, b);
|
||||
end
|
5
interfaces/matlab_experimental/Func/frdivide.m
Normal file
5
interfaces/matlab_experimental/Func/frdivide.m
Normal file
@ -0,0 +1,5 @@
|
||||
function r = frdivide(a, b)
|
||||
% Get a functor that is the ratio of the input functors 'a' and
|
||||
% 'b'.
|
||||
r = Func('ratio', a, b);
|
||||
end
|
4
interfaces/matlab_experimental/Func/ftimes.m
Normal file
4
interfaces/matlab_experimental/Func/ftimes.m
Normal file
@ -0,0 +1,4 @@
|
||||
function r = ftimes(a, b)
|
||||
% Get a functor that multiplies two functors 'a' and 'b'
|
||||
r = Func('prod', a, b);
|
||||
end
|
Loading…
Reference in New Issue
Block a user