When writing user defined functions how can i have a function of a variable as an input variable?
Mostra commenti meno recenti
I am trying to write a function for example: function res = MyFunction(x1,x2,x3,f)
where f is a function of x but Matlab doesn't seem to like this. Is there a way around this without previously defining a function?
2 Commenti
Steven Lord
il 7 Nov 2016
Can you show a little more context, like how you define the variables x1, x2, x3, and f with which you call MyFunction and what exactly "Matlab[sic] doesn't seem to like this" means?
- Does it throw an error, and if so what is the full text of the error message?
- Does it issue a warning, and if so what is the full text of the warning message?
- Does it return a result different than what you expect?
- Does it do something else (and if so, what does it do?)
Jacob Carias
il 7 Nov 2016
Modificato: Jacob Carias
il 7 Nov 2016
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!