how to use passing by value and passing by reference
Afficher commentaires plus anciens
Basically i have many variables in my code , so i want to use in my function just passing by value and reference. Can anybody tell me with example.
Réponse acceptée
Plus de réponses (1)
James Tursa
le 30 Oct 2019
0 votes
In the background, MATLAB effectively passes all variables into functions as shared data copies. This has the same effect as passing by reference for variables that you don't modify inside the function, i.e. you don't get a deep data copy. Is this what you are asking about?
2 commentaires
RAHUL KUMAR
le 30 Oct 2019
Steven Lord
le 30 Oct 2019
Can you tell us a bit more information about how you've defined your function, how you're trying to call it, and the particular problem / pain / difficulty you're experiencing when trying to call it? With a bit more information we may be able to suggest an easier / faster / "better" solution for calling your function.
Catégories
En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!