How to plot graph from equation

조회 수: 4 (최근 30일)
JInjo liker
JInjo liker 2020년 2월 16일
댓글: JInjo liker 2020년 2월 16일
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
  댓글 수: 1
JInjo liker
JInjo liker 2020년 2월 16일
No guy Can you fix it like my above picture Pleasee Thanks lot

댓글을 달려면 로그인하십시오.

추가 답변 (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