How to plot this line?

2 次查看(过去 30 天)
Hello everyone,
I should plot line 19 (with years, months and days) but it gives me this error.
And when I try to plot in another way with line 12, not all of the data of lines 19 appear in the graph.
Can anyone help me kindly?
load('GIULIA_MMEQ1.mat');
A=GIULIAMMEQ1.Var4;
B=str2double(A);
NEW= B * 10 * 0.35;
C=GIULIAMMEQ1.Dec1997;%array2table
C=replace(C,"';","");
C=datetime(C,'InputFormat','dd MMM yyyy'); %convert to datetime format
plot(C,NEW)
load('DATI_ECM_GIORNALIERI');
hold on
plot(datetime(DATIECMWFgiornalieri.Year,1,1),(DATIECMWFgiornalieri.Month,1,1),(DATIECMWFgiornalieri.Days,1,1), DATIECMWFgiornalieri.SMB_mpmm,'m-*', 'DisplayName','ECMWF');
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Error in connector.internal.fevalMatlab

Error in connector.internal.fevalJSON
legend('Location','best')

采纳的回答

Walter Roberson
Walter Roberson 2021-8-14
编辑:Walter Roberson 2021-8-16
plot(datetime([DATIECMWFgiornalieri.Year, DATIECMWFgiornalieri.Month, DATIECMWFgiornalieri.Days]), DATIECMWFgiornalieri.SMB_mpmm, 'm-*', 'DisplayName','ECMWF');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by