- Read about input to make the user to enter the results. (I would prefer straight away values)
- If A is a 2X2 matrix and b is 2*1 matrix...you have Ax = b. This can be solved using "\". Read about it.
- To plot, you can take some x range (xmin,xmax)..substitue it in the striaght line equation (ax+by=c) and get y. Use plot(x,y) to plot it.
- To get intersection, you can follow general coordinate geometry intersection of lines method. https://byjus.com/point-of-intersection-formula/
Plotting a pair of linear equations to display a graph showing the solution of a pair of simultaneous equations that my program solves.
5 views (last 30 days)
Show older comments
Hello fellow users. I would like to know how to plot a par of linear equations to display a graph showing the solution of a pair of simultaneous equations that my program solves. Note: The equations are in the form : x1*X + y1*Y = z1 x2*X + y2*Y = z2. The user is prompted to enter these values (x1,y1,z1,x2,y2,z2) hence determining the equations. A plot of the 2 equations showing where the 2 lines interecept ( solution calculated by program) would be a nice addition to the program. Any help is aprreciated and thank you in adnvance.
0 Comments
Accepted Answer
KSSV
on 9 Jul 2020
1 Comment
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!