I want to execute a script. Should I execute it as a function or should I just run in the command window??
which one ll be better? or advantages?
Most of the times, it is better to use function.
A function in matlab ll take input and give the output. All the other variables inside the function are not stored, so it ll not populate the matlab variables list
Please see the video for details