Borrar filtros
Borrar filtros

Automatically open matlab model with different enconding

2 visualizaciones (últimos 30 días)
Yuan Xiao
Yuan Xiao el 17 de Ag. de 2017
Respondida: Mabin Mariam Joseph el 22 de Ag. de 2017
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?

Respuestas (1)

Mabin Mariam Joseph
Mabin Mariam Joseph el 22 de Ag. de 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

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by