I have monthly data and would like to make plot annually
but my plot is weird like that
this is my code and I combine data and year
I'd like to make a plot with year (x)and data(y)
I have short english and matlab so sorry about awkward explain
Thanks
date=readtable(name3{2},'Range','A13:A23')
data=readtable(name3{2},'Range','B13:M23')
data=data{:,:}
date=date{:,:}
A=[date,data]
x=A(:,1)
y=A(:,2:end)
plot(x,y)
->monthly, ↓annual

 Respuesta aceptada

KSSV
KSSV el 22 de Feb. de 2022

0 votos

Try:
plot(x',y')

4 comentarios

il147
il147 el 22 de Feb. de 2022
Thanks for help but It made same plot!
KSSV
KSSV el 22 de Feb. de 2022
Try:
T = readtable(myfile) ;
T = table2array(T) ;
x = T(:,1) ;
y = T(:,2:end) ;
plot(x,y)
il147
il147 el 22 de Feb. de 2022
Does T mean data or date?
KSSV
KSSV el 22 de Feb. de 2022
T is a table.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 22 de Feb. de 2022

Comentada:

el 22 de Feb. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by