calculation of time series.
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have monthly (420 months) time series data of temperature . I need to calculate a another time series based on following formula:
x = T(month,i) - T(month,i-1)
where, T(month,i) is temperature of current month
T(month,i-1) is temperature of previous month
how to create a time series of x ?
0 comentarios
Respuestas (3)
Image Analyst
el 6 de Nov. de 2015
If the second index is the month number, what does the first index represent? Have you tried
x = diff(T(month,:))?
2 comentarios
Image Analyst
el 6 de Nov. de 2015
But originally you said T was a 2-D array - it had two indexes: for a row and a column. Now you're saying T is a 1D array taking only one index. Totally inconsistent. Which is it?????
SONI SONI
el 9 de Nov. de 2015
2 comentarios
Image Analyst
el 9 de Nov. de 2015
Now you're back to a 1-D array, NOT a 2-D array despite what you say, because it has only 1 index.
And your code just does diff() which is the same as what I gave you except in a function instead of a for loop.
I give up.
Ver también
Categorías
Más información sobre Language Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!