Version (1.41 KB) by Knut
A simple function for displaying 3-d arrays similar to how image() can be used for 2-d arrays.


Updated Fri, 11 Mar 2011 03:38:39 +0000

View License

I use image() a lot for quickly getting an overview of what a 2-d array contains. I have searched through the Volume visualization guides without finding anything similar for 3-d arrays, so I have made one myself.

The approach is very simple: make a "box" out of 6 patches centered at each datapoint, and multiply each walls opacity by the corresponding array elements numeric value.

1. As the number of elements grows, the memory usage and plotting system cpu usage quickly gets too large
2. This is a crude approximation of "voxels", but the amount of blocked light is proportional to the number of wall transitions, not the real distance.

Cite As

Knut (2023). Image3 (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Images in Help Center and MATLAB Answers

Inspired: pcolor3

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes