Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

how to manipulate imwrite caxis?

Asked by Mohamed on 5 Oct 2012

If you choose a colormap for imwrite, how does the colorscaling work? is there a way to try manipulate the caxis by choosing the number of steps in the colormap for example?

0 Comments

Mohamed

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 5 Oct 2012

The documentation indicates,

 imwrite(X,map,filename,fmt) writes the indexed image in X and its associated colormap map to filename in the format specified by fmt. 

The question of color scaling is thus irrelevant, as indexed images do not use color scaling.

I suspect you might want to take advantage of the File Exchange contribution "freezeColors" to convert the image into a truecolor image that you can get() the Cdata property of and imwrite() that array (with no map)

0 Comments

Walter Roberson

Contact us