How create .M file and function in that file with name same as file Name
Mostra commenti meno recenti
I want to create a .M file and function in that file which should accept input arguments.
example:
File with name as myFuntion and should contain following code in that file
function Myfunction(~,msg)
end
3 Commenti
madhan ravi
il 21 Mar 2019
Could you show an example?
Manohar Thunga
il 21 Mar 2019
Adam
il 21 Mar 2019
I use a series of fprintf commands when I want to dynamically write a .m file (e.g. I have a function that creates a template for a unit test for a given function name). There's not much else to it though beyond getting all the formatting right ini those fprintf instructions.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements 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!