Data Visualisation With MATLAB
3MATLAB is a high performing language for computation, visualization and integration of programming languages in an environment where problems and solutions are expressed in common mathematical notation. MATLAB offers displaying vectors and graphs visualisation in two or three dimensional format including animation.
Plot vectors as lines
Plot a histogram of 1,000 random numbers sorted into 30 equally spaced bins.
x = randn(1000,1);
nbins = 30;
h = histogram(x,nbins);
Plot multiple histograms
3D Model
The relationship between the base current and the emission based voltage
Lineplots
Contour Chart
Slice & Dice- Four dimensional models
clc, clear, close all
x = -1:0.1:1;
y = -1:0.1:1;
z = -1:0.1:1;
[X, Y, Z] = meshgrid(x, y, z);
data = abs(cos(X) + cos(Y) + cos(Z));
figure(1)
slice(X, Y, Z, data, 0, 0, 0)
shading interp
axis equal
alpha(0.75)
colorbar
colormap jet
xlabel('')
ylabel('')
zlabel('')
set(gca, 'XTick', -1:0.1:1)
figure(2)
for movingsclice = -1:0.1:1
slice(X, Y, Z, data, movingsclice, movingsclice, movingsclice)
shading interp
alpha(0.75)
colorbar
colormap jet
xlim ([-1,1])
ylim ([-1,1])
zlim ([-1,1])
drawnow
end
figure(3)
slice(X, Y, Z, data, [], [-1 -0.5 0 0.5 1], [])
shading interp
alpha(0.75)
colorbar
colormap jet
view(-80, 15)
figure(4)
slice(X, Y, Z, data, [], [], [-1 -0.5 0 0.5 1])
shading interp
alpha(0.75)
colorbar
colormap jet
view(-20, 10)