Visualizing 3 dimensional array

195 views (last 30 days)
Andrew DeCenzo
Andrew DeCenzo on 22 Feb 2020
Edited: Matt J on 22 Feb 2020
I'm sorry if this is a stupid question, but I've really been scratching my head on this one. Maybe explaining exactly what I'm trying to do might help. Basically I'm simulating the temperature of a car battery over time during the course of a race. Then I change a parameter of how much the battery is cooled, and reiterate the loop. So my array is ~ 6000x15x20.
The value in each index represents temperature. The rows represent the "i'th" timestep (say every 0.1 seconds). The columns represent the "j'th" lap. The k index represents the heat transfer coefficient. So for example, T(end,:,1) would represent the temperature at the end of each lap with a heat transfer coefficient of 1(or some multiple of the index).
What i'm trying to do is visualize the temperature vs. time of the battery for a range of heat transfer coefficients. I can't figure out how to actually format this data as vectors to make a 3d plot, or surface plot, or whatever makes sense for the data. I think maybe I could reformat the 2d array of each k index into a vector, but then i'm not sure where to go from there.
I would really appreciate any advice you guys could provide. Thanks!

Accepted Answer

Walter Roberson
Walter Roberson on 22 Feb 2020
Some of the basic ways to graph 4D data (3 independent variables plus one dependent variables) are:
  • slice()
  • isosurface()
  • volumeViewer() or similar voxel tools such "vol3d v2" from File Exchange
  • unpeel into multiple graphs
  • scatter3() in which the independent variables are the X Y Z, and the dependent variable is used to change either the object size or the object color

More Answers (1)

Matt J
Matt J on 22 Feb 2020
Edited: Matt J on 22 Feb 2020
You could probably use volumeViewer,
to explore your data as a 3D volume, even though it was designed primarily with medical image data in mind.

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!