Editing CSFUNC, not working without C,D matrices

I am trying to implement a continious function using S function, i tried editing csfunc file in toolbox/simulink/blocks
but the file is not working without C and D matrix . I have only A and B matrices of the system and i need to calculate dx/dt=Ax+Bu
As output i need the state vector x
I am learning to implement Sfunction and will highly appreciate your help,Thank you,Have a nice day

1 Kommentar

Please explain what you mean by "the file is not working without C and D matrix"? Have you eliminated all uses of 'C' and 'D'? What error/incorrect behavior do you see?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Omur
Omur am 21 Nov. 2011

1 Stimme

C and D matrices are necessary in a state-space representation, you cannot skip them. But they are easy to find.
As you said, your output is your state vector. So this makes C = identity matrix the size of your state vector and D=0.

Weitere Antworten (1)

reen2015
reen2015 am 30 Nov. 2011

0 Stimmen

Thank u kastubha and omur. i got it correct.

Kategorien

Mehr zu Block and Blockset Authoring finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

am 28 Okt. 2011

Community Treasure Hunt

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

Start Hunting!

Translated by