You forgot to put in the arguments as data:
clc;
clear;
Excel= xlsread('receiverlocations.xlsx','points') ;
x= Excel(:,1)';
y= Excel(:,2)';
fid = fopen('ny.txt','wt');
for i=1:length(x)
pRef=___
fftFreq=____
fprintf(fid, [...
'R-%d\n',...
'{\n',...
' position %.2f %.2f\n',...
' pRef %e\n',...
' fftFreq %d\n',...
'}\n',...
'\n'],...
i,x(i),y(i),pRef,fftFreq);
end
fclose(fid)
Best Answer