Matlab - functions Flashcards
1
Q
what is a function
A
- Functions take inputs and return outputs.
- everything that happens
within a function is hidden or encapsulated from the main workspace
2
Q
what does a global variable mean when writing a function?
A
this variable will not be hidden and will share the same values
3
Q
how do you write a function?
A
- the same way as a script
- it must begin with the word function
- function [outputs] = function_name (inputs)
4
Q
why is a path important with functions?
A