Azzera filtri
Azzera filtri

How do you use the slice function with color?

2 visualizzazioni (ultimi 30 giorni)
Samantha Clayton
Samantha Clayton il 28 Giu 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;

Risposte (0)

Categorie

Scopri di più su Colormaps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by