Does a local function variable matter?
Mostrar comentarios más antiguos
When I am creating a function, does the variable I used to define it matter? When I call it in a script, I use it as the file name I saved it as. For example:
function E1=E_Voight(Vr,Em,Er)
E1=Er*Vr+Em*(1-Vr);
end
This is my function, I refer to it by its file save name (also E_Voight), but could I redefine this entire function using only x, y, z and change the file name to "Potato" and refer to it in a script as "Potato(1,2,3)" and the variables x,y,z used to define the function would not interfere with a variable that I had named x in my script?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Historical Contests en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!