MATLAB: Change X axis units

loadunits

Hi!
I was given some data where Y axis is in uV and X axis in seconds. I want to change both units to mV and to hours.
My problem is that the data is "loaded" to my matlab code, for instance:
s1=load('data.txt');
So I don't know how to change the units.

Best Answer

In the following example, I assumed that 1st column in data.txt is x-values and 2nd column is y-values
s1 = load('data.txt');
t = s1(:,1);
uV = s1(:,2);
t_hour = t/3600;
mV = uV/1000;
plot(t_hour, mV)