Help code in matlab

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Posts: 37
Joined: Tue Sep 26, 2017 9:30 am America/New_York

Help code in matlab

HELLO; who can help me to correct this code? I want to superimpose or compare the points insitu on the image:

ncdist=zeros(4320,8640); dist=dist+10000; % matrice des distances
lon = ncread('D:\K\A20130572013064.L3m_8D_CHL_chlor_a_4km.nc','lon') ;
lat = ncread('D:\K\A20130572013064.L3m_8D_CHL_chlor_a_4km.nc','lat') ;

% plot here

chlor_a=double(chlor_a);
data1=chlor_a*0.000717185-2;
none=data1<45;
data1=data1.*none;
DiffTemp=[];

% matrice qui va contenir le rÃ©sultat du code

for d=3505:3645
for s=0170:0065
dist(d,s) = sqrt( (num(4)-lat(d))^2 + (num(5)-lon(s))^2 );
end
end

[minval,ind] = min(dist(:));

% on retient les indices qui correspondent Ã  la distance minimale

[I,J] = ind2sub([size(dist,1) size(dist,2)],ind);
% on converti les indices en I,J
DiffTemp= [num(4),num(5),num(3),data1(I,J)];
end

Tags: