from
4D Data Visualization with Matlab Implementation
by Hristo Zhivomirov
An 4D (four dimensions) data visualization using Matlab commands “scatter” and “slice”.
|
| four_dim_scatter.m |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4D Data Visualization %
% with Matlab Implementation %
% Author: M.Sc. Eng. Hristo Zhivomirov %
% 02/16/2013 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear, clc, close all
x = 0:0.2:10; % first dimension data
y = 0:0.2:10; % second dimension data
z = 0:0.2:10; % third dimension data
[X Y Z] = meshgrid(x, y, z);
data = sqrt(X.^2 + Y.^2 + Z.^2); % write the equation that describes the fourth dimension
figure(1)
scatter3( X(:), Y(:), Z(:), 3, data(:))
%xlabel('Tape your xlabel here')
%ylabel('Tape your ylabel here')
%zlabel('Tape your zlabel here')
%title('Tape your title here')
colorbar
|
|
Contact us