I am writing a code for a research project in space physics and at the very end I output a matrix with time, and the magnetic field strength.
The final function is
function [time, data_out]=time_Bpar_Bperp(fname)
[time, Bparallel] = loadthemismag(fname);
eparallel = make_eparallel(fname);
eperp = make_eperp(time, eparallel(:,2:4), fname);
Bperp = make_Bperp(eparallel(:,2:4), eperp, Bparallel(:,2:4));
data_out=[time, Bparallel, Bperp];
The data in time is about every 3 seconds but the data located in data_out(:,1) is not the same as time. When I plot time vs data_out(:,1), the resulting plot looks like stairs. Any ideas on why the time is being messed up in the matrix, and nothing is happening to it outside of it. If it matters the matrix is 28526 by 3.