There are several inconsistencies in your code:
(1) You are calling the function file called fn. However, your function file is named f1.
(2) You are inputting too many inputs (five in total, viz. 2.0:0.1:4.0,0.04:0.001:0.06,beta0,n,T) in fn. However, you have assigned only four input variables, viz. alpha,beta,beta0,T
(3) Another crucial err is that you have not defined//calculated Profits().
If you post the missing parts of your scripts, additional help can be provided.