Demo entry 6783716

matlab

   

Submitted by anonymous on Feb 18, 2019 at 17:19
Language: Matlab. Code size: 1.7 kB.

clc
clear 

t = 2;
beta = 0.2;
k = 0.5;

x1 =@(X1,X2,X3) beta * X2.^2 * t^2 + X1;
x2 =@(X1,X2,X3) k * X2 * t + X2;
x3 =@(X1,X2,X3) X3;

%%%%%%%%%%%%%%% AB %%%%%%%%%%%%%%
X1 = zeros(1,11);
X2 = 0:0.1:1;
X3 = zeros(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
grid on
hold on

%%%%%%%%%%%%%%% BC %%%%%%%%%%%%%%
X1 = 0:0.1:1;
X2 = ones(1,11);
X3 = zeros(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%%% CD %%%%%%%%%%%%%%
X1 = ones(1,11);
X2 = 0:0.1:1;
X3 = zeros(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%%% AD %%%%%%%%%%%%%%
X1 = 0:0.1:1;
X2 = zeros(1,11);
X3 = zeros(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%%% EF %%%%%%%%%%%%%%
X1 = zeros(1,11);
X2 = 0:0.1:1;
X3 = ones(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%%% FG %%%%%%%%%%%%%%
X1 = 0:0.1:1;
X2 = ones(1,11);
X3 = ones(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%%% GH %%%%%%%%%%%%%%
X1 = ones(1,11);
X2 = 0:0.1:1;
X3 = ones(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on
%%%%%%%%%%%%%%% EH %%%%%%%%%%%%%%
X1 = 0:0.1:1;
X2 = zeros(1,11);
X3 = ones(1,11);

plot3(x1(X1,X2,X3),x2(X1,X2,X3),x3(X1,X2,X3) )
hold on

%%%%%%%%%%%%%% line %%%%%%%%%%%%%
plot3([x1(0,0,0),x1(0,0,1)],[x2(0,0,0),x2(0,0,1)],[x3(0,0,0),x3(0,0,1)])
plot3([x1(0,1,0),x1(0,1,1)],[x2(0,1,0),x2(0,1,1)],[x3(0,1,0),x3(0,1,1)])
plot3([x1(1,1,0),x1(1,1,1)],[x2(1,1,0),x2(1,1,1)],[x3(1,1,0),x3(1,1,1)])
plot3([x1(1,0,0),x1(1,0,1)],[x2(1,0,0),x2(1,0,1)],[x3(1,0,0),x3(1,0,1)])

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).