MATLAB: Plotting a graph using matlab

plot

I have the value of a time varying variable for every 5 seconds. How to plot a graph with it.

Best Answer

Try something like:
t = 0:5:100;
x = sin(t);
plot(t,x,'*')
xlabel('time in s')
ylabel('my y axis')
title('my title')
where x would represent your data. Make sure that the length of your time vector equals the length of your data vector.