How can I extract the data (values) which are comming under the line

3 ビュー (過去 30 日間)
GAUTAM
GAUTAM 2020 年 1 月 25 日
回答済み: Image Analyst 2022 年 8 月 8 日
Hello, I have values of NO2 with its latitude & longitude, I plotted that in matlab, Now I want to extract perticular NO2 values say those NO2 values which comes under a perticular line. I have potted the line on the previous map (NO2, lat, lon) as shon in the figure. So please help me in extracting the perticular NO2 data(values) which comes under this line. I used the following code to plot the map with line.
Thankyou
figure
map = pcolor(lon1,lat1,no2);
map.EdgeAlpha = 0
colormap('jet')
colorbar();
hold on
j = [76.5,77.669];
k = [29.1,28.36];
pl = line(j,k);
pl.Color = 'red';
hold off
no2 with line.png

回答 (2 件)

Takumi
Takumi 2020 年 1 月 27 日
How about interpolation?
clear
close all
clc
[X,Y,Z] = peaks(50); % sample
figure
map = pcolor(X,Y,Z);
map.EdgeAlpha = 0
colormap('jet')
colorbar();
hold on
j = [-1,1];
k = [1,-1];
pl = line(j,k);
pl.Color = 'red';
hold off
xq = linspace(-1,1,100);
yq = linspace(1,-1,100);
F = griddedInterpolant(X',Y',Z');
vq = F(xq,yq);

Image Analyst
Image Analyst 2022 年 8 月 8 日
Convert it to a digital image and then use improfile

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by