Azzera filtri
Azzera filtri

Automatically open matlab model with different enconding

2 visualizzazioni (ultimi 30 giorni)
I have a model with some Japanese character in it. Everytime I open it, it will warn me with the error and I have to manually type "slCharacterEncoding('Shift_JIS')" in the Matlab command prompt and choose the model to open.
I have try to put the "slCharacterEncoding('Shift_JIS')" on preload function but it does not work.
Is there any automatic way to do that so that I can just open the model with no error comes out?

Risposte (1)

Mabin Mariam Joseph
Mabin Mariam Joseph il 22 Ago 2017
Try saving the model in the SLX format. SLX files do not warn because they can store characters from any encoding.
Models created from R2012b onwards have the .slx extension by default. You can upgrade an MDL file to SLX file format. The file contains the same information as the MDL file and you always have a backup file as well.
Refer to the below MATLAB documentation links on how to save in the .slx file format :
https://www.mathworks.com/help/simulink/ug/saving-a-model.html#btbr7mo-1
https://www.mathworks.com/help/simulink/ug/saving-a-model.html#btbr7kx-1

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by