How do I input a struct as an input to a custom matlab simulink function?
Ältere Kommentare anzeigen
I have a struct which defines constants and vectors for aerodynamics surfaces on an aircraft. How do I create a bus with a struct input?
1 Kommentar
stozaki
am 23 Feb. 2020
Can you use stateflow?
Antworten (2)
Alok Virkar
am 26 Feb. 2020
Bearbeitet: Alok Virkar
am 26 Feb. 2020
Sai Sri Pathuri
am 26 Feb. 2020
0 Stimmen
When you created the bus object using Simulink.Bus.createObject, a structure s2Bus and a bus object slBus1 are created. Assigning the bus name as 's2Bus' has only changed the field 'busName' in s2Bus structure but the name of bus object is still slBus1. (as you can see in below figure)

Hence, you need to set the datatype of bus input as Bus: slBus1.
3 Kommentare
Alok Virkar
am 1 Mär. 2020
Sai Sri Pathuri
am 4 Mär. 2020
Can you attach the simulink model?
Alok Virkar
am 28 Apr. 2020
Bearbeitet: Alok Virkar
am 28 Apr. 2020
Kategorien
Mehr zu String finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

