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

3 vues (au cours des 30 derniers jours)
Ali Sasani
Ali Sasani le 25 Juin 2019
Réponse apportée : KSSV le 26 Juin 2019
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

Réponses (1)

KSSV
KSSV le 26 Juin 2019
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)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by