Plot with respect to real time

1 次查看(过去 30 天)
Mridul Tiwari
Mridul Tiwari 2015-10-7
How can i plot a data with respect to real time ( time passed) ?

回答(1 个)

TastyPastry
TastyPastry 2015-10-7
Determine what unit you're using for passed time. Assuming seconds, you can set your x-values to be
xValues = 0:t;
where t is the elapsed time from t=0.
Then you just need to set your y-values to whatever your data is.
yValues = data;
Make sure the dimensions of x and y are equal.
Call the plot function:
plot(xValues,yValues);

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by