Define several functions in s-function builder

조회 수: 5 (최근 30일)
Michael Goebel
Michael Goebel 2020년 7월 6일
댓글: Besme James 2022년 3월 23일
How can i define and use several functions within an s-function builder block?
I use the s-function builder to include arduino Code. But these functions use sub functions. If i define then in the ouput Tab ob the s-function builder, those functions are finally defined within a function of the s-function which leads to an error. My solution so far is to build that s-function and manually edit (and rename to cpp) the c-file afterwards before building the model.
Is there another way to define those additional functions within the s-function builder?

채택된 답변

Michael Goebel
Michael Goebel 2020년 7월 6일
Maybe i can answer the question myself : Move those functions to a seperate h-file and include it in the s-function builder?
  댓글 수: 2
Michael Goebel
Michael Goebel 2020년 7월 13일
Yes, it works. Thx Michael
Besme James
Besme James 2022년 3월 23일
hehe:))))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by