How can i draw a color map from spread sheet in excel? In excel, I have the second attached figure where x=wave length,y=Abs., and legend = doping conc. I want to draw them like the attached color map. attached image from excel shows the data

조회 수: 4 (최근 30일)
<<pic>>

채택된 답변

Image Analyst
Image Analyst 2017년 6월 4일
This code will make that red, white, and blue patriotic colormap:
numColors = 256;
ramp = linspace(0, 1, numColors/2)';
rampFlipped = linspace(1, 0, numColors/2)';
flat = ones(numColors/2, 1);
redColorMap = [flat; rampFlipped];
greenColorMap = [ramp; rampFlipped];
blueColorMap = [ramp; flat];
blueRedColorMap = [redColorMap, greenColorMap, blueColorMap];
colorbar();
colormap(blueRedColorMap);
  댓글 수: 2
mai desouky
mai desouky 2017년 6월 5일
How can i redefine the matrix ( which is attached in that form in the excel figure) such that the matlab draws it exactly as in the color map figure? In fact my main problem is i can not write the code for the table to convert it to such matrix. where x=wave length, y =doping Nd and the variable/color bar is the absorption from 0-1.
Image Analyst
Image Analyst 2017년 6월 5일
The data in the workbook defines curves where there is just one value for one wavelength - not a bunch of values for a wavelength which would be an image. These curves seem to be shown over the image as faint curves. They seemed to somehow use all three 1-D curves in building the 2-D image. I have no idea how they did that. You'll have to ask someone else.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by