I am tracking my steps and distance per day using a pedometer. To force myself to learn more about MathScript, I decided to monitor the results using MathScript. In Excel, the charts allow using dates on the x-axis which is helpful for reviewing the data. I can't seem to figure out how to do this in MathScript. Here's a simple example for only two days of data:
time = [datenum('9-Apr-2007') datenum('10-Apr-2007')];
%time = ['9-Apr-2007' '10-Apr-2007' ];steps = [2743 3000];
distance = [0.96 1.05];
figure(1);
plot(time, steps);
xlabel('Date');
ylabel('Steps');
title('Number of Steps vs. Date');
figure(2);
plot(time,distance);
xlabel('Date');
ylabel('Distance (miles)');
title('Distance vs. Date');
When I run this script I get the two plots and data with no errors. The only problem is that date x-axis is in the datenum floating point format. Is there any way to plot a date string? Eventually I'll have a text file with the date in the first column and the # of steps and distance in the next two columns and read from this file. First things first!
Also, in the next version of MathScript, can you please make the Esc key clear the current line in the Command Window?
Thanks