Why do I receive an error: "Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters." from file "system_dependent.m"

44 Ansichten (letzte 30 Tage)
Recently I am getting the following error when opening MATLAB or typing command like "ver" or "edit" in the command window:
Error using ver
Error: File: system_dependent.m Line: 1 Column: 24
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 24 Jan. 2024
The file "system_dependent.m"  is a built-in MATLAB function. 
This error is most likely caused because another "system_dependent" function is shadowing the built-in. This could happen when a folder that contains a "system_dependent.m" file was either added to MATLAB Path or it is the MATLAB Current Folder and thus it takes precedence when the function is called.
Please refer to the MATLAB Function Precedence Order below for more details:
 
To identify if the built-in function has been shadowed and fix the issue, please follow the steps below:
1.  Execute the following command in MATLAB Command Window:
>> which -all system_dependent
If the output contains directory paths, followed by the line:
built-in % Shadowed
then the built-in "system_dependent.m" function has been shadowed by the files in the preceding directories. 
 
2. Remove the preceding directories from the MATLAB Path or rename the "system_dependent.m" files in those directories.
You can remove the directories by doing the following:
a. On the Home tab in the MATLAB Toolstrip, in the Environment section, click Set Path. The Set Path dialog box opens, listing all folders on the search path.
b. Find and select the directories you want to remove and click the Remove button.
c. Save your changes.
 
3. Restart MATLAB

Weitere Antworten (0)

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by