how to solve my code with this error

25 views (last 30 days)
DJIBRINE Abakar on 16 Jul 2018
Commented: Alexander Thif on 5 Nov 2020
how to solve my code with this error;A valid state attribute should be either a character vector, a cell array or a valid MATLAB structure
OCDER on 16 Jul 2018
But we can make a guess on how to fix the error - Convert the state attribute to a character vector, a cell array, or a valid MATLAB structure. :)

Sign in to comment.

Answers (2)

chirag rohit
chirag rohit on 23 Oct 2019
In your simulink model there must be an integrator. And in properties of integrator you have changed below input,
State Name: (e.g., 'position')
Whatever name you write here it should be alwasy within ''. Or just leave that input as ''.
It might solve your error.

solanki divyesh
solanki divyesh on 3 Mar 2020
i shaw an error like (undefined function 'matlab' for input arguments of type 'char'


Find more on Argument Definitions 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!

Translated by