s |NaN|? 

A(2,2) = NaN

wmean(A,w)

%% 
% We can ignore that missing entry instead of turning the whole solution for
% that column to |NaN|: 

wmean(A,w,'omitnan')

%% Example 3: Area-weighted SST
% Here's a map of sea surface temperatures using some example data that comes 
% with CDT: 

% Load the sample data:
load global_sst

% Convert from Kelvin to Celsius:
sst = sst-273.15; 

% Plot SSTs: 
imagescn(lon,lat,sst)
cmocean thermal % colormap
cb = colorbar; 
ylabel(cb,'sea surface temperature \circC')

%%