Page 1 of 1

### Help code in matlab

Posted: Fri Jan 17, 2020 8:16 pm America/New_York
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') ;
chlor_a= ncread('D:\K\A20130572013064.L3m_8D_CHL_chlor_a_4km.nc','chlor_a') ;

% 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

num=xlsread('C:\Users\User\Desktop\Chla\SECTEUR OUEST.xlsx');for k=1:size(num)
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