A "standard" function could be considered a black box where you throw data in and get something out of it.
Once you defined the mechanism of the black box, you give it some data:
foo([1 2 3])
ans =
3
If you need the data to test your function there are several ways of doing that:
- the simplest but dangerous way is to name the data in your workspace the same as your variables in your function and run it as a script (line by line).
- the methodic way is to edit run configurations for the function (next to the green play icon)
- the most straightforward is to call the function after you saved it.
If you have to use that specific data all the time, then hardcode it.
Evalin can throw variables in your function workspace from the base workspace. I never used the function except from educational purposes and I discourage you to do so.
Else, is hard to imagine what you're trying to accomplish w/o additional details.
