How to plot this line?

조회 수: 2 (최근 30일)
Pul
Pul 2021년 8월 13일
편집: Walter Roberson 2021년 8월 16일
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