How to plot like the following figure?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MD AZIZ AR RAHMAN
am 16 Sep. 2021
Kommentiert: Image Analyst
am 17 Sep. 2021
I can gnerate the reflectance for different wavelength and diameter. In excel it ends up as a table, where the top row is assigned for diameter, and the leftmost column is assigned for wavelength. The remaining cell values are the reflectance at a particular wavelength and particular diameter. I need to plot like the following figure. Please share the code
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 17 Sep. 2021
data = readmatrix(xlsfileName);
imshow(data, [], 'XData', [0, 500], 'YData', [300, 1200]);
xlabel('D (nm)')
colormap(jet(256));
colorbar;
Then use text() function to overlay the words.
2 Kommentare
Image Analyst
am 17 Sep. 2021
I recommend using the row and column headers. Then those can be pulled out of the data as the first row and column
data = readmatrix(xlsxFileName);
diameters = data(1, 2:end);
wavelengths = data(2:end, 1);
signal = data(2:end, 2:end);
Weitere Antworten (1)
the cyclist
am 16 Sep. 2021
I recommend looking at the MATLAB Plot Gallery, finding a figure that is close to what you need, and pulling the code from there.
0 Kommentare
Siehe auch
Kategorien
Mehr zu 2-D and 3-D 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!