I require a plot of a pcolor for my project result. Each projection data(Trial1, 2,,3,... ) I had set it in numeric matrix form. hh = surface(ze​ros(size(x​)),x,'Pare​nt',cax);

1 Ansicht (letzte 30 Tage)
%LBP formula
DispMap= zeros(pixel);
for Tx=1:N
for Rx=1:N
DispMap= DispMap + (SL(Rx,Tx)*NormEpair{Rx,Tx});
end
end
%%-------Fixed scale 0 to 1------
normDispMap=DispMap; % rename display image
a = min(normDispMap(:));
b = max(normDispMap(:));
for Tx = 1:pixel;
for Rx = 1:pixel;
normDispMap(Tx,Rx) = ((normDispMap(Tx,Rx)-a)./ (b-a))*1;
%%Eliminate NaN value at norm DispMap ; if not matlab cant plot img
e=normDispMap(Tx,Rx);
d=isnan(e);
e(d)=NaN;
normDispMap(Tx,Rx)=e;
end
end
%Displaying map
subplot(1,2,1);
pcolor(normDispMap(1:pixel,1:pixel));
imageCenter=[72.5,72.5];
title('reconstructed image(rescaled 0-1)');
shading interp; % To hide the grid line from pcolor
colormap (jet) % Change color map to jet colour
colorbar % Display colorbar at RHS
subplot(1,2,2);
imagesc(normDispMap(1:pixel,1:pixel))
set(gca, 'YDir', 'normal')

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by