How can I generate 3D bar graph for multidimensional matrix?

Hello,
I am trying to plot a 3D bar graph where I am using y as multidimensional matrix. While trying to execute command bar3(x,y), it shows me an error "Inputs must be 2-D". Will you please help me solving this?
Thank you.
Harsh

3 Comments

How can only one dimension (as you say the 3rd dimension) be used represent a multidimensional matrix?
I have updated my question to make it more clear.
If your y is three dimensional, it contains a dependent value corresponding to every combination of three independent variables. In a bar3 chart, bar height represents each y value, and bars are positioned with their bases on a 2D plane. That 2D plane corresponds to only two of your three independent variables. How do you want your third independent variable to be represented? You've run out of spatial dimensions, so perhaps time (an animation) or maybe color?
I recommend drawing a picture of what you want your final product to look like. Label every dimension. If you still need help, upload that picture and a .mat file containing your data.

Sign in to comment.

Answers (0)

Products

Asked:

on 20 Jan 2015

Commented:

on 21 Jan 2015

Community Treasure Hunt

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

Start Hunting!