Does anyone know how can I plot this?
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I should plot the second column of TTS table at the place of variable "NEW".
Moreover, I should plot DATI_ECM and DATI_MAR from 1998 and not from 1993 as I did in the plot
Could anyone help me kindly?
1 个评论
Scott MacKenzie
2021-7-29
编辑:Scott MacKenzie
2021-8-4
It would probably help if you spent a bit more time crafting a meaningful, self-contained question -- one that does not require us to download and study multiple data files and a script. Yes, it's good to have code and data to work with, but your question itself should be more detailed and informative.
回答(2 个)
Ashutosh Singh Baghel
2021-8-4
编辑:Ashutosh Singh Baghel
2021-8-5
Hi,
I understand you faced issues with 'plot' function. Please update and execute your code with following suggestions -
1.Variable name "Height(mm)" must be changed to remove brackets with proper variable names. (Eg- "Height_mm"). A guide for valid variable names inside MATLAB can be found here.
2. For plotting Data from 1998 to 2019, use 'xlim' beneath the 'plot' function along with the limits you need.
Eg -
x_start = datetime(1998,01,01);
x_end = datetime(2019,31,12);
xlim([x_start x_end]);
3 个评论
Ashutosh Singh Baghel
2021-8-6
编辑:Ashutosh Singh Baghel
2021-8-6
Hi pul,
I understand you wish to 'plot' 'TTS' table second variable against the 'T.Year' variable. This is not possible as the vectors must be of the same length. A possible workaround solution is by repeating the vector elements defined in 'TTS' variable 2 with the number of days present/left in each year defined by 'T.Year'. Please find the attached updated code for reference.
Also find the section in attached code about the 'xlim' function.
3 个评论
Ashutosh Singh Baghel
2021-8-6
Hi,
From my understanding, this is a variable definition error which generally occurs when MATLAB cannot find a particular variable or MATLAB program file in the current directory or on the search path.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!