Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
close all
close all
clc
hold off
finfo=ncinfo('Pop Up.cvs')
plot('Year','Num_corals')
xlabel('Year')
ylabel('Num_Corals')
  3 Kommentare
Elizabeth Gleneck
Elizabeth Gleneck am 2 Dez. 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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Chunru
Chunru am 2 Dez. 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')

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by