Discrepancy in imagesc from given matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Suchetana Mitra
am 13 Aug. 2022
Kommentiert: Suchetana Mitra
am 13 Aug. 2022
I want to plot a heatmap of a matrix with corresponding values of d1 and d2 using imagesc
%Relevant code
d1=linspace(0.1,2.2,200);
d2=linspace(0.1,2.2,200);
x=d1;
y=d2;
z=readmatrix('Plant.csv');
imagesc(x,y,z)
colorbar
colormap(flipud(hot))
set(gca,'YDir','normal')
d1(150)=1.67
d2(50)=0.6
z(150,50)=0.43
However according to the plot z(150,50)=0; this is very confusing to me am I using imagesc wrong
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 13 Aug. 2022
Remember that z(150,50) is z at the 150th Y value and the 50th X value. Rows correspond to Y not to X.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!