I created a file that generates a certain number of data points, below is a simplified version. When I open up the text file, the text file rounds the numbers to lower precision. How do I extend the number of significant digits in the text file?
%% Starting and ending location for signal
Ti = 0; %-1e-5
Step = .00000000004; %4e-11
Tend = .00005; %1e-5
%% Generates data
Total_data = (Tend-Ti)/Step;
V = zeros(1.25e6,2);
Velocity_Profile = zeros((1.25e6)+1,1);
Time_Profile = zeros((1.25e6)+1,1);
k = 1;
for i=Ti:Step:Tend
V(:,1) = i;
Velocity = 0;
if i<0
Velocity = 0;
end
if i>0
Velocity = 500;
end
Velocity_Profile(k,1) = Velocity_Profile(k,1) + Velocity;
Time_Profile(k,1) = Time_Profile(k,1) + i;
k = k+1;
end
Velocity_Profile;
Time_Profile;
Profile = [Time_Profile, Velocity_Profile];
fid=fopen(['Test.txt'],'w+');
fprintf(fid,'%f,%f\n',[Time_Profile,Velocity_Profile].');
fclose(fid);