input an array for sales against time graph in matlab

Here's an example of how to input an array for sales against time graph in MATLAB:

main.m
% create a sales array
sales = [100 120 140 135 150 200 220 245 260 300];

% create a time array
time = [1 2 3 4 5 6 7 8 9 10];

% plot the sales against time graph
plot(time, sales);

% set the title of the graph
title('Sales against Time');

% label the x-axis
xlabel('Time');

% label the y-axis
ylabel('Sales');
316 chars
18 lines

You can replace the sales array and time array with your own data. The plot function plots the sales values against time values. You can customize the graph by changing the title and axis labels.

related categories

gistlibby LogSnag