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

21 visualizzazioni (ultimi 30 giorni)
Provide me a code for this problem

Risposte (2)

Paulus Hansdak
Paulus Hansdak il 5 Ago 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 il 11 Lug 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?

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by