How can I extract the data (values) which are comming under the line
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
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);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!