Hi!
I'm trying to write a function which takes two vectors e.g a=[1;1] and b=[2;1] and plots the solution of
a.'*(x-b)=0 on a 2D plot. So basically, with these values I'm trying to plot m=3-n but I have to write it as a function so that it can take variables. How can I achieve this?
Thanks

댓글 수: 2

Eamon
Eamon 2016년 9월 30일
You can use the function fplot, as shown here, to plot the equations.
I have read about it but what I'm looking for is to see if it's possible to have a matrix with 2 parametric elements and plot them. I ended up using the elements seperately, solving the equation manually and it works.
x1=0:5;
x2=(a(1)*b(1)+a(2)*b(2)-a(1)*x1)/a(2);
plot(x1,x2)

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2016년 9월 30일

댓글:

2016년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by