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

1 次查看(过去 30 天)
close all
close all
clc
hold off
finfo=ncinfo('Pop Up.cvs')
plot('Year','Num_corals')
xlabel('Year')
ylabel('Num_Corals')
  3 个评论
Elizabeth Gleneck
Elizabeth Gleneck 2021-12-2
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

请先登录,再进行评论。

回答(1 个)

Chunru
Chunru 2021-12-2
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')

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by