anyway to call matlab function without bracket
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yu Li
am 11 Nov. 2019
Kommentiert: Yu Li
am 11 Nov. 2019
Hi:
the usual Matlab function need to be called like: function(input), but I noticed that some function such as 'save', can be used like: save a a
so my question is, is there anyway to call a Matlab function like: function input
Thanks!
Yu
0 Kommentare
Akzeptierte Antwort
JESUS DAVID ARIZA ROYETH
am 11 Nov. 2019
yes it is possible, but you cannot assign the result to a variable, I leave you an example:
function c=sumexample(a,b)
if ischar(a)
a=str2double(a);
end
if ischar(b)
b=str2double(b);
end
c=a+b;
this function can be called in both ways:
sumexample 4 5
and
sumexample(4,5)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!