arguments in embedded coder
Afficher commentaires plus anciens
Hi, I just want to know, If is correct the next function.
function [p,L] = exchange2 (p,D)
I mean, to have the same name to input variable and output variable.
another doubt is if Can I use the same variable name, but in different functions in the same file. I explain well.
regards!
Réponse acceptée
Plus de réponses (1)
Ryan Livingston
le 17 Déc 2012
1 vote
Moreover, using the same variable as an input and output may trigger an optimization which reduces copies in the generated code. Namely, the input "p" may be passed by reference in this case:
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware 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!