error while trying to open MATLAB Simulink file
13 次查看(过去 30 天)
显示 更早的评论
hello
I am facing this issue right now, I switch off the matlab but nothing, last time I faced same issue and I unistalled matlab and install again but can not do it everytime when this isuue happend.
could anyone help meout pls. thanks
Warning: Error parsing file:
File: C:\Users\User\AppData\Roaming\MathWorks\MATLAB\R2021b\sl_toolstrip_plugins\preferences.json
Line: 1
Error: [json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input;
expected '[', '{', or a literal
回答(1 个)
Suchitra
2022-12-8
Hello Salah,
I understand you are facing some issues while opening the Simulink model with R2021b.
Please follow the below workaround to resolve the issue:
- Modify the search path and clear the cache: Before modifying the search path, it is important to take a backup of your 'pathdef.m' file, which can be located by using the command:
>> which -all pathdef
Before proceeding, ensure that you make a safe copy of the file by copying it to a folder outside of your MATLAB path.
After taking the backup, execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
After this step, use Simulink to see if the issue occurs again. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
>> savepath
NOTE: This will remove any custom paths you may have created. The following MATLAB Answers post is an additional resource on how to back them up:
- Regenerate MATLAB preferences: Go through the following MATLAB Answer link to understand the workflow:
I hope the above workaround resolves your issue, else, please contact Technical Support
MathWorks Support information is available here:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!