How to plot graph from equation

4 次查看(过去 30 天)
clc
close all
clear all
syms T2 T3 T4 x4 x3 ;
x2 = [T2 ;T3 ;T4];
T1 = 303;
k = 10;
L = 3;
h = 10;
figure(1)
for x3 = [1 0.1 0.01 0.001]
x1 = [-2 1 0;1 -2 1;0 -1 1+x3];
equ = x2 == inv(x1)*[-100*(x3)^2-303; -100*(x3)^2; 100*(x3)^2+303*x3];
disp(equ)
plot(x3,equ,'b')
hold on
end
I wanna plot grah by x3 is x axis and T2 T3 T4 is y axis

采纳的回答

Gifari Zulkarnaen
Gifari Zulkarnaen 2020-2-16
I'm not sure what do you want, is it like this?
x3 = [1 0.1 0.01 0.001];
x2 = zeros(3,4);
for i=1:4
x1 = [-2 1 0;1 -2 1;0 -1 1+x3(i)];
x2(:,i) = inv(x1)*[-100*(x3(i))^2-303; -100*(x3(i))^2; 100*(x3(i))^2+303*x3(i)];
end
plot(x3,x2(1,:))
hold on
plot(x3,x2(2,:))
plot(x3,x2(3,:))
hold off

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by