how to solve my code with this error

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

2 Kommentare

Adam Danz
Adam Danz am 16 Jul. 2018
Can't fix what we can't see :)
You'll need to share the section of code causing the error and any relevant variable values.
OCDER
OCDER am 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. :)

Melden Sie sich an, um zu kommentieren.

Antworten (2)

chirag rohit
chirag rohit am 23 Okt. 2019

5 Stimmen

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.

2 Kommentare

Keaton Cable
Keaton Cable am 29 Jan. 2020
Thank you!
Alexander Thif
Alexander Thif am 5 Nov. 2020
that was helpfull thank you for your answer!

Melden Sie sich an, um zu kommentieren.

solanki divyesh
solanki divyesh am 3 Mär. 2020

0 Stimmen

i shaw an error like (undefined function 'matlab' for input arguments of type 'char'

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 16 Jul. 2018

Kommentiert:

am 5 Nov. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by