Using colormap function with area under a curve
8 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Image Analyst
on 22 Aug 2013
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.
See Also
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!