How to plot graph from equation

4 vues (au cours des 30 derniers jours)
JInjo liker
JInjo liker le 16 Fév 2020
Commenté : JInjo liker le 16 Fév 2020
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

Réponse acceptée

Gifari Zulkarnaen
Gifari Zulkarnaen le 16 Fév 2020
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
  1 commentaire
JInjo liker
JInjo liker le 16 Fév 2020
No guy Can you fix it like my above picture Pleasee Thanks lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by