- Three dimensional plots are used to represent a function of three variables

%%%%%%%%%%%%%%%%%%%%%%
%
%Illustration to plot
%variation of many
%variables
%
%%%%%%%%%%%%%%%%%%%%%%%
clear all
clc
values=zeros(101,101,101);
t=0:0.01:1;
t1=-0.5:0.01:0.5;
t2=-0.5:0.01:0.5;
for kk=1:1:101
for jj=1:1:101
for ii=1:1:101
values(ii,jj,kk)=cos(2*pi*t(ii))*cos(2*pi*t1(jj))*cos(2*pi*t2(kk));
end
end
end
figure
colormap jet
contourslice(t,t1,t2,values,1:1:51,1:1:101,1:1:101)
xlabel('t')
ylabel('t1')
zlabel('t2')
colorbar
view(-11,14)
%axis equal