简体   繁体   中英

how do you visualize a matrix whose elements are vectors in MATLAB?

I have generated a 3 x 2 x 25 matrix A in MATLAB.

A(1,2,1) = 5 means method 1, type 2, trial 1 has a count value of 5.

A(3,1,2) = 7 means method 3, type 1, trial 2 has a count value of 7.

Basically, there are 25 count values for each (method, type) pair.

In the past, I have used "histogram" MATLAB function to visualize a 2-D frequency plot and I know I can use it here like so:

histogram(A(3,1,:))

But if I use histogram I would have to plot all 6 like:

histogram(A(1,1,:))
histogram(A(1,2,:))
histogram(A(2,1,:))
histogram(A(2,2,:))
histogram(A(3,1,:))
histogram(A(3,2,:))

But I was wondering if there is a way to all 6 plots in a 3-dimensional histogram ?

You want 4 dimensions of information on a 3 dimensional plot. the only good way to get a 4th dimension of information would probably be color and that's going to be a mess with 6 plots. You're better off separating the plots into different graphs.

From what you're describing the second dimension only has 2 states. Would it make sense in your case to have 2 3d plots with this dimension being split across graphs/colors?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM