Finding ratio of two columns and then plotting a scatter with the ratio and timestamp

7 次查看(过去 30 天)
Hello,
I have a test data set attached that includes timestamps and other made up variables for my own practice to get familiar with MatLab.
I am trying to divide the results in column 32 by the corresponding numbers in column 19... so far I have been able to do this using:
data{:,32}./data{:19};
This generates a new table with the values I am interested in and now I want to plot those values as the Y-axis in a scatter with their corresponding timestamp as the X-axis.
Anyone have experience with this? Thanks!Screen Shot 2019-06-25 at 3.31.45 PM.png

回答(1 个)

KSSV
KSSV 2019-6-26
t0 = datetime('26-Jun-2019 00:00:00') ;
t1 = datetime('26-Jun-2019 23:00:00') ;
thedates = t0:hours(1):t1 ;
y = rand(size(thedates)) ;
plot(thedates,y,'.r','MarkerSize',10)

类别

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

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by