Using colormap function with area under a curve
Mostrar comentarios más antiguos
Hi,
I would like to know how to use the colormap function. I have used the area function to find the area under the curve now I would like to show that it is changing from 1000 to 100. If I run the code below the area is only blue.
if true
X = [0.85,0.57,0.42,0.34,0.28,0.24,0.21,0.19,0.17,0.15,0.14,0.13,0.12,0.11,0.10,0.10,0.095,0.09,0.085
Y = 100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000
area(X,Y)
grid on
colormap jet
end
I am not sure if this is the correct way to do this so any help is great. Kayne
Respuestas (1)
Image Analyst
el 22 de Ag. de 2013
0 votos
The colormap function applies a pseudocolor look up table to an image. So you'd have to create an image of that curve using interp1(), then apply the colormap.
1 comentario
kayne
el 23 de Ag. de 2013
Categorías
Más información sobre Blue en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!