How to find time derivative of a variable in a NetCDF File?

조회 수: 1 (최근 30일)
Lavnish Gupta
Lavnish Gupta 2018년 5월 21일
댓글: Lavnish Gupta 2018년 5월 21일
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?

채택된 답변

KSSV
KSSV 2018년 5월 21일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by