Using colormap function with area under a curve
Mostra commenti meno recenti
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
Risposte (1)
Image Analyst
il 22 Ago 2013
0 voti
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 Commento
kayne
il 23 Ago 2013
Categorie
Scopri di più su Blue in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!