I have the hardest time formatting my data files!
Every time I try running this the code goes into an infinite loop.
Also, I'd like to start the top n value at 0 if possible
%Creating the datafile
% Datafile Operations
for i = 1:16Q = [(i);t(i);g(i)];fileID = fopen('DSP_HW4.txt', 'wt');fprintf(fileID, '%2s', 'n');fprintf(fileID, '%6s', 'Time');fprintf(fileID, '%6s', 'g(n)');fprintf(fileID, '\n');fprintf(fileID,'%2.0f %+8.3f %+8.3\n', Q);endtype('DSP_HW4.txt');fclose(fileID);
Best Answer