How to plot this line?

2 Ansichten (letzte 30 Tage)
Pul
Pul am 13 Aug. 2021
Bearbeitet: Walter Roberson am 16 Aug. 2021
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')

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by