Plot system of equations

조회 수: 28 (최근 30일)
Emmanuel Negron
Emmanuel Negron 2019년 9월 4일
답변: Bhargavi Maganuru 2019년 9월 9일
I need help on how to type this in Matlab and make a plot of this system of equations.
  댓글 수: 3
Emmanuel Negron
Emmanuel Negron 2019년 9월 4일
편집: Emmanuel Negron 2019년 9월 4일
I uploaded a picture with the discription of the system of equations I want to plot on Matlab
9x-3y=-1
(1/5)x+(2/5)y=(-1/3)
Range y=x= +-5
darova
darova 2019년 9월 5일
What about plot() function?

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

답변 (1개)

Bhargavi Maganuru
Bhargavi Maganuru 2019년 9월 9일
You can create function handles to the named or anonymous functions.
For example, for first equation in your system of equations you can write
x=linspace(-5,5);
f = @(x) (9*x+1)/3;
For more information about creating function handles refer to the link https://www.mathworks.com/help/matlab/matlab_prog/creating-a-function-handle.html
You can use fplot(f) function to create a plot defined by y=f(x)
fplot(f)
ylim([-5,5]) %to limit y-axis from -5 to 5
For more information about fplot refer to the link https://www.mathworks.com/help/matlab/ref/fplot.html

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by