Use API in matlab

40 ビュー (過去 30 日間)
Ricardo Rene Cachu Castillo
Ricardo Rene Cachu Castillo 2021 年 4 月 19 日
回答済み: Rik 2021 年 4 月 19 日
Hello, I want to integrate matlab with the api of power nasa. I search but I didn'f find information.
The link is this
I want to put the data in a matrix, so if someone know how tell me please.
Thank you.

回答 (1 件)

Rik
Rik 2021 年 4 月 19 日
You're in luck: NASA decided to provide the data in JSON, and Matlab can parse that JSON output for you:
url='https://power.larc.nasa.gov/cgi-bin/v1/DataAccess.py?&request=execute&tempAverage=CLIMATOLOGY&identifier=SinglePoint&parameters=T2M&userCommunity=SB&lon=0&lat=0&outputList=JSON&user=DOCUMENTATION';
data=webread(url);
data.header
ans = struct with fields:
api_version: '1.1.0' fillValue: '-999' range: '30-year Meteorological and Solar Monthly & Annual Climatologies (January 1984 - December 2013), 22-year Additional Solar Parameter Monthly & Annual Climatologies (July 1983 - June 2005)' title: 'NASA/POWER SRB/MERRA2 0.5 x 0.5 Degree Climatologies'

カテゴリ

Help Center および File ExchangeJSON Format についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by