- When you use a function instead of a script, there are more opportunities for optimization
- When you use a script instead of a function, the entire workspace of the caller of the script is right there, and any changes you make to variables inside the script potentially affect the caller. The script needs to be careful not to accidentally affect the caller in ways the caller is not expecting
Syntax clarity on function
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a script that goes like:
The script name is also ManageX. It doesn't look like there is any input or output. Why do we need this function here then, I wonder?
function ManageX
if
end
if
end
1 Kommentar
Walter Roberson
am 18 Jul. 2020
Antworten (1)
Vimal Rathod
am 23 Jul. 2020
Hi,
You can have a look at some of the answers to this question link given below. There was a healthy discussion in the forum regarding this.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Integrate C Code Using C Caller Blocks 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!