Clear Filters
Clear Filters

How to plot 4d bar with 4 column vectors?

12 views (last 30 days)
Nguyen Van Dung
Nguyen Van Dung on 23 Dec 2023
Answered: Rik on 23 Dec 2023
Hi all,
I have some output from a complex relation, the 4 variable are in coloumns as x,y,z, and c. The 3 columns x,y,z are the initial conditions and c is the result of a specific function I use c = f(x,y,z). and I need to plot 4D data bar, the data are as given below:
A = [
69.50956 14.45304 16.03739 262.045932
69.3668 15.05836 15.57484 262.691047
68.4101 16.02971 15.56019 264.640937
67.84168 17.28155 14.87677 267.658605
67.20665 18.13252 14.66083 270.075647
66.3371 19.36381 14.29909 273.91297
65.80449 19.99892 14.1966 275.86286
65.06194 20.92092 14.01714 279.890124
64.29886 22.10763 13.59351 282.048778
63.7482 22.99904 13.25276 288.071279
68.00027 14.82149 17.17824 263.835827
Any ideas?

Answers (1)

Rik
Rik on 23 Dec 2023
For this small number of elements, I would try plot3, with the 4th dimension replaced by color.
Once you get to many more data points you should consider a 3D image viewer (medical image viewers can easily handle this kind of data).

Tags

Community Treasure Hunt

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

Start Hunting!