Azzera filtri
Azzera filtri

I cannot figure out how to get my data to plot on a simple line graph.

1 visualizzazione (ultimi 30 giorni)
close all
close all
clc
hold off
finfo=ncinfo('Pop Up.cvs')
plot('Year','Num_corals')
xlabel('Year')
ylabel('Num_Corals')
  3 Commenti
Elizabeth Gleneck
Elizabeth Gleneck il 2 Dic 2021
I'm trying to make a graph of the number of population on the x and the year on the y axis. I really apperiacte the help. Thank you

Accedi per commentare.

Risposte (1)

Chunru
Chunru il 2 Dic 2021
data = readmatrix('Copy of Pop Up.csv');
x = data(:, 1);
y = data(:, 3);
plot(x, y);
% plot('Year','Num_corals') % This is not correct; doc plot
xlabel('Year')
ylabel('Num_Corals')

Categorie

Scopri di più su Line 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