Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Elizabeth Gleneck
Elizabeth Gleneck le 2 Déc 2021
Réponse apportée : Chunru le 2 Déc 2021
close all
close all
clc
hold off
finfo=ncinfo('Pop Up.cvs')
plot('Year','Num_corals')
xlabel('Year')
ylabel('Num_Corals')
  3 commentaires
Elizabeth Gleneck
Elizabeth Gleneck le 2 Déc 2021
Thank you. I attached it here.
Elizabeth Gleneck
Elizabeth Gleneck le 2 Déc 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

Connectez-vous pour commenter.

Réponses (1)

Chunru
Chunru le 2 Déc 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')

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by