How to make a function and input another function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
i want to make a function and use as input another function . in the second function i will have an equation , at the first one i will have a type . so i can use diferent functions to caldulate the same . for example
function [i] = bbb (r,a,b)
i=@r(a)-@r(b)
end
as r i will use humps or fun or something like that
so when i call it i will write :
bbb (humps,0.5,1)
how can i write it corectly ?
0 Commenti
Risposte (1)
Steven Lord
il 16 Gen 2023
I think what you want is:
y = bbb(@humps, 0.5, 1)
function [i] = bbb (r,a,b)
i=r(a)-r(b);
end
0 Commenti
Vedere anche
Categorie
Scopri di più su Whos in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!