How do you use the slice function with color?

5 visualizaciones (últimos 30 días)
Samantha Clayton
Samantha Clayton el 28 de Jun. de 2018
I have a 3x3x3 matrix and I want it to correspond to the color of each square, yet rather than producing a 3x3x3 cube, a 2x2x2 cube is generated. Here is my code:
colormap jet
xslice = 10; yslice = 10; zslice = [0.1 1 10];
slice([0.1 1 10], [0.1 1 10], [0.1 1 10], my_map(:,:,:,1), xslice, yslice, zslice);
ax = gca; ax.XScale = 'log'; ax.YScale = 'log'; ax.ZScale = 'log';
colorbar;

Respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by