フィルターのクリア

Special Characters åäö in matlab editor

5 ビュー (過去 30 日間)
Daniel Vennetti
Daniel Vennetti 2020 年 2 月 20 日
回答済み: Parag Jhunjhunwala 2023 年 6 月 9 日
Hi,
When I try to open an m-file in the editor all of the swedish special characters åäö are replaced with ? or square boxes.
This causes a problem when I am trying to use the addpath function as follows:
Program_folder ='\\blahblah.se\Väg'
addpath(genpath(Program_folder))
I get the following error when I run the program - Undefined function or variable 'Program_folder'.
If I manually enter on the command line Program_folder ='\\blahblah.se\Väg' and then comment out that line in the m-file then the program works fine.
I even have plots where I use the special characters in the title and they are also replaced with ? when the program runs.
This program has worked with my old computer which was running an older version of matlab so it is either the new release of matlab (R2019a) or the new computer that is causing the problem.
I have seen that other people have had a similar problem but was not able to apply the same fixes with setenv or feature('DefaultCharacterSet'), so if that is the solution then please tell me specifically how I should use the commands to fix the problem.

回答 (1 件)

Parag Jhunjhunwala
Parag Jhunjhunwala 2023 年 6 月 9 日
I have tried running the commands in the latest version of MATLAB(R2023a) editor and it doesn't produce any error for me.
Program_folder ='\\blahblah.se\Väg'
Program_folder = '\\blahblah.se\Väg'
addpath(genpath(Program_folder))

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by