arguments in embedded coder
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 10 Dez. 2012
Yes, it is fine to have the same variable name on input and output.
Yes it is fine to use the same variable name in different functions.
Weitere Antworten (1)
Ryan Livingston
am 17 Dez. 2012
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:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!