フィルターのクリア

Insert "Nan" in Interpolated data from GRIDDATA that fall outside known data

2 ビュー (過去 30 日間)
Dhirendu Somani
Dhirendu Somani 2021 年 3 月 5 日
編集済み: Dhirendu Somani 2021 年 3 月 5 日
Below is my code. I'm using interpoltation on the grid points using 'griddata'.
Currently the range of mesh grid which I have given is out of my sample dataset . As it is doing interpolation then why it is calculating "Vq" in query region which is outside our sample dataset. It should give NaN in that region.
~ Also if it does so then can how can we insert 'NaN' in the zone which is outside of our sample dataset ?
Thanks in Advance
clear all; clc;
F = importdata('Data.txt'); % X; Y; V;
F = F.data;
X = F(:,1); Y = F(:,2); V = F(:,3); % known values
[Xg,Yg] = meshgrid(-51:0.2:-49,10:0.1:20);
Vq = griddata(X,Y,V,Xg,Yg);

回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by