How can I combine those lines into a surface (plot3) to surface

1 view (last 30 days)
I want to draw a surface between the lines
clear
clc
T_1_4=[1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4];
T_1_2=[1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2];
T_1_0=[1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0];
T_0_8=[0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8];
T_0_6=[0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6];
for i=1:5
SOI = xlsread('internal_2', i, 'A2:A11');
T (:,:,i)= xlsread('internal_2', i, 'D2:D11');
end
plot3(T_1_4,SOI,T(:,:,1))
hold on
grid on
plot3(T_1_2,SOI,T(:,:,2))
plot3(T_1_0,SOI,T(:,:,3))
plot3(T_0_8,SOI,T(:,:,4))
plot3(T_0_6,SOI,T(:,:,5))
xlabel('Equivelent ratio');ylabel('Start of ignition "BBDC" (Degree)');zlabel('Torque')

Accepted Answer

Star Strider
Star Strider on 9 Dec 2018
See if this does what you want:
T_Mtx = ([1.4; 1.2; 1; 0.8; 0.6] * ones(1,10))';
SOI = xlsread('internal_2.xlsx', 1, 'A2:A11');
SOI_Mtx = SOI * ones(1,5);
for i=1:5
T(:,i)= xlsread('Mohammad FAQIR internal_2.xlsx', i, 'D2:D11');
end
surf(T_Mtx,SOI_Mtx,T)
xlabel('Equivelent ratio');ylabel('Start of ignition "BBDC" (Degree)');zlabel('Torque')
I simplified your code a bit, as well.
  4 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!