Azzera filtri
Azzera filtri

plotting vectors of 3 population over years

1 visualizzazione (ultimi 30 giorni)
riley collins
riley collins il 19 Apr 2018
Risposto: Akira Agata il 26 Apr 2018
3 vectors that need to be plotted to show each population as each year goes by. so far both plot() and plotv() create a table and no errors but nothings is displayed on the table any help is appreciated
  2 Commenti
KSSV
KSSV il 19 Apr 2018
How is your data? How you want the plot? There are various ways to display the data in MATLAB.
riley collins
riley collins il 19 Apr 2018
datta is all large numbers eg vec1 = [115600, 765840, 123423] vec2 = [115100, 765440, 543245] vec3 = [123600, 763210, 324323]
ant all im trying to do is get a lone graph to show each population at a certain year value but i cannot get any results plotted

Accedi per commentare.

Risposte (1)

Akira Agata
Akira Agata il 26 Apr 2018
I think you have to make year vector to plot your data, like:
vec1 = [115600 765840 123423];
vec2 = [115100 765440 543245];
vec3 = [123600 763210 324323];
year = [2000 2005 2010];
figure
plot(year,vec1)
hold on
plot(year,vec2)
plot(year,vec3)
legend({'vec1','vec2','vec3'})

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