Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
close all
close all
clc
hold off
finfo=ncinfo('Pop Up.cvs')
plot('Year','Num_corals')
xlabel('Year')
ylabel('Num_Corals')
  3 comentarios
Elizabeth Gleneck
Elizabeth Gleneck el 2 de Dic. de 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

Iniciar sesión para comentar.

Respuestas (1)

Chunru
Chunru el 2 de Dic. de 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')

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by