Filter löschen
Filter löschen

How do you use the slice function with color?

4 Ansichten (letzte 30 Tage)
Samantha Clayton
Samantha Clayton am 28 Jun. 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;

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by