How to find time derivative of a variable in a NetCDF File?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Lavnish Gupta
el 21 de Mayo de 2018
Comentada: Lavnish Gupta
el 21 de Mayo de 2018
I am having a NetCDF file which has temperature as one of its variable and time as the other. I want to calculate partial derivative of Temperature w.r.t time to plot it with time. How can we execute this in MATLAB?
0 comentarios
Respuesta aceptada
KSSV
el 21 de Mayo de 2018
Read the variables into MATLAB from netCDF file using ncread. Let T be your temperature and t be you time variables. To get derivative of T w.r.t t use:
iwant = gradient(T)./gradient(t);
or
iwant = diff(T)./diff(t) ;
I go for gradient, because this will not reduce the size of variable.
Más respuestas (0)
Ver también
Categorías
Más información sobre NetCDF 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!