I am trying to change the first input variable in the above function by these steps
%% Call the transfer matrix R, T, A calculator function and build spectra
%%%may be need to % Convert angle to radians
[n1]=xlsread('SiO2_n_k.xlsx');
[n2]=xlsread('TiO2_n_k.xlsx');
l= 41;
i=1:l;
n = n1(i,2);
m = n2(i,2);
W1=n2(i,1);
% Preallocate memory
R = zeros(1,l);
T = zeros(1,l);
A = zeros(1,l);
for m = 1:l
% Reflection and transmission coefficients, r, t, not used, so
% replace output with ~. Can add back in if needed.
% [r(m),t(m),R(m),T(m),A(m)]=jreftran_rt(wl(m),d,n(m,:),t0,polarization);
% full form of jreftran_rt
[~,~,R,T,A]=rerlect_rt(l,[NaN,100,500,2000],[1,2.9+0i,1.458+0i,1.5],0,0)
but I have the folowing error
Error: File: rerlect_rt.m Line: 8 Column: 22
Function with duplicate name "rerlect_rt" cannot be defined.
Error in Untitled2 (line 20)
[~,~,R,T,A]=rerlect_rt(l,[NaN,100,500,2000],[1,2.9+0i,1.458+0i,1.5],0,0)