How can I get rid of error--'Model' Parameter must be a character vector

47 views (last 30 days)
Hello all,
I'm trying to run a simulink model using 'sim(model)' command but I get the error ''Model' Parameter must be a character vector'.
I dont know what the problem is. Can anyone help me solve this.
---------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------

Answers (1)

Fangjun Jiang
Fangjun Jiang on 24 Oct 2022
If your model name is 'codetrial', then it should be sim('codetrial').

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!