MATLAB: Function that has a text file as input

matlab function

Hi I somehow know how to create a new function in matlab, while the function has NUMBERS as input. How can I define a Text file as input for my Matlab function? your answers really makes my life easier.

Best Answer

What exactly do you mean by "text file"? The name or the contents of the file?
Both possibilities mean, that the input is a string, but in the first case, the input is treated as file name.