I cannot change the datetime x axis locale setting in the plot function.

Hello,
I'm trying to change the datetime plot language in the 2d plot.
Here's my problem.
As you can see, in the first and second plot, the date is shown in Korean.
I want to change it into English format.
But I cannot find how to do it.
Can anyone help me?
I tried Locale Setting change to English in MATLAB General Setting
here, but it didn't change anything.
Thank you for reading this.

 採用された回答

Star Strider
Star Strider 2022 年 4 月 9 日

1 投票

In the datetime documentation under Input Arguments see 'Locale' (there is no direct llink to it).
Defining:
MyDatetimeArray.Locale = "en_US";
could work.

9 件のコメント

dpb
dpb 2022 年 4 月 9 日
Good catch, SS...
Star Strider
Star Strider 2022 年 4 月 9 日
@dpb — Thank you!
daeyeong Lee
daeyeong Lee 2022 年 4 月 10 日
I tried your suggestion, but this doesn't seem to solve the problem.
Thank's for your reply anyway. :)
Star Strider
Star Strider 2022 年 4 月 10 日
That was not what I sugested.
What I suggested would translate to:
datearr.Locale = "en_US";
Try thiat.
.
daeyeong Lee
daeyeong Lee 2022 年 4 月 10 日
Following Error Message poped up after executing command.
Would using the MATLAB2019a version be the problem?
daeyeong Lee
daeyeong Lee 2022 年 4 月 10 日
I tried the suggestion in MATLAB 2021b, the latest version, but the same error message pops up.
Did I followed your instruction properly as you intended?
Thank you for your kind replies and struggles :).
Star Strider
Star Strider 2022 年 4 月 10 日
Yes, you did.
At this point, I suggest that you Contact Support and see if MathWorks can offer any suggestions. I am out of ideas. (Include the URL of this thread in your note to MathWorks so they will know what you already tried.)
daeyeong Lee
daeyeong Lee 2022 年 4 月 11 日
As you suggested, I requested MATLAB support.
And here's the support team's reply
Here's the link that the support team attached.
Due to your perspiration, I finally got answer.
Deeply thank you, SS.
Wish you good luck!
Star Strider
Star Strider 2022 年 4 月 11 日
As always, my pleasure!
Thank you for following up with MathWorks’ response.

サインインしてコメントする。

その他の回答 (1 件)

dpb
dpb 2022 年 4 月 9 日

1 投票

Since your UI is in Koren, the system LOCALE is set to it.
I don't know all there is to be known about how MATLAB uses the LOCALE, but reading the section in the doc on internatialization, it appears to me you'll probably have to set the OS LOCALE to US and then reboot.
It didn't appear there's a way to have ML use one value while the system is on another.
This issue has to be an absolute nightmare for developers to cope with...

1 件のコメント

daeyeong Lee
daeyeong Lee 2022 年 4 月 10 日
Setting OS Locale to English.... OK thank you for your suggestion.
I'll try this night and respond with the result.
But it seems to be quite a heavy solution though....

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Objects についてさらに検索

製品

リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by