How to choose query points when using griddata function

I have a some 1200x1 arrays. The different arrays consists of values, latitude and longitude. The points is of 4 km resolution. I want to use the griddata function to interpolate to 1km resolution. I have tried this functuion:
vq = griddata(x,y,v,xq,yq).
Where x is latitude, y is longitude, v is values, xq and yq is query points. I dont know how I can choose query points so the grid will be at 1 km resolution.
I really need help.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 14일
[xq, yq] = ndgrid(min(x):1/4:max(x), min(y):1/4:max(y));

댓글 수: 2

I just tried. Unfortunately I got this error message:
Error using repmat Requested 1415537x492539 (2597.3GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in ndgrid (line 63) varargout{1} = repmat(x,size(y));
You said the points are of 4 km resolution, but I get the impression that they are given in units of meters.
[xq, yq] = ndgrid(min(x):1000:max(x), min(y):1000:max(y));

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

질문:

2018년 6월 14일

편집:

2018년 6월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by