Effacer les filtres
Effacer les filtres

How do you use the slice function with color?

2 vues (au cours des 30 derniers jours)
Samantha Clayton
Samantha Clayton le 28 Juin 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;

Réponses (0)

Catégories

En savoir plus sur Colormaps dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by