Draw a graph that joins the points (0,1), (4,3), (2,0) and (5,-2).

2 views (last 30 days)
Provide me a code for this problem

Answers (2)

Paulus Hansdak
Paulus Hansdak on 5 Aug 2021
x=[0,4,2,5];
y=[1,3,0,-2];
plot(x,y)
title('JOINING OF POINTS')
xlabel('X-Axis--->')
ylabel('Y-Axis-->')

Image Analyst
Image Analyst on 11 Jul 2020
Sounds like a homework problem. Is it? Have you tried to put all the x values into one variable, all the y values into another, and calling plot?
x = [0, 4............
y = [1,3,.............
plot(x, ...............
It should be pretty easy to finish the above code, right?

Categories

Find more on 2-D and 3-D Plots 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!