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!
0 个评论
回答(1 个)
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!