Text/strings not working in Matlab 2018a

I recently upgraded to Matlab 9.4.0.813654 (R2018a) from R2017a (where everything was working fine), and now whenever I plot things or sometimes when I form strings from variables the text doesn’t work at all.
Example:
plot(rand(100,1),DisplayName,TestText)
title(TestText)
Gives me a plot with an empty legend and no title…
I have installed the same Matlab version on 3 computers and I only have this problem on one of them.
Any ideas on what could be causing it and how to fix it?

1 件のコメント

Christopher Creutzig
Christopher Creutzig 2018 年 4 月 23 日
Have you checked which font is being used, or tried explicitly setting one you know works in other places?

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

回答 (1 件)

Rik
Rik 2018 年 4 月 2 日

0 投票

Maybe it would work if you replaced the curved accent
by a straight accent
'

6 件のコメント

Petter Stefansson
Petter Stefansson 2018 年 4 月 2 日
That curved appearance is probably just caused by some autocorrection/automatic formatting thing as I pasted the question into the text editor of the browser here. I’m using the normal straight accent, the same symbol that is used for transposing variables etc.
I also tried using double quotes:
title(TestText)
but it does the same thing. I have been using matlab for many years so I’m afraid this is not a question of me not knowing how to invoke the text, there is something fundamentally wrong with how matlab is interpreting/rendering it.
Rik
Rik 2018 年 4 月 2 日
I can't reproduce your output. I did notice that you didn't call legend, yet you get a legend anyway.
Petter Stefansson
Petter Stefansson 2018 年 4 月 2 日
Well of course you can’t reproduce the output if you are using a functioning healthy Matlab installation, Matlab is clearly not supposed to behave like it currently is on my computer. Like I said, I installed the same R2018 version on 3 different computers and only had this problem on one, on the other two this example shows up with the text as it should.
When I made the example figure I manually activated the legend using the GUI button to illustrate that it was empty.
Rik
Rik 2018 年 4 月 2 日
If you think it is a corrupt installation, why don't you try re-installing it?
Walter Roberson
Walter Roberson 2018 年 4 月 2 日
What shows up for
which -all text
Petter Stefansson
Petter Stefansson 2018 年 4 月 2 日
This shows up:
>> which -all text
built-in (P:\Matlab 2018a\toolbox\matlab\graph2d\text)

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

カテゴリ

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

製品

質問済み:

2018 年 4 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by