Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Struct from nonvirtuell Bus
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I wrote a Matlab System to communicate via a UART interface of the Raspberry Pi. I call the C-functions from the Matalb System with the coder.ceval command. The pidata_parse C-function returns the Data from the UART. For the In- and Ouput of the Matlab System I'm using a nonvirtuell Bus. out is the Name of the ouput.
If I try to do the following
out = coder.ceval(pidata_parse .....)
Matlab tells me to pre-initialsize the output. So I did the following:
out = struct{'a',0,'b',0 etc}
which works fine. Note: My Output will always be some kind of struct.
Evertime I change the Data thats coming in, I have to open up the System and change the strcut aswell as the definition of the nonvituell Bus. Is it somehow possible to create the struct depending on the entries of the Bus, so I only have to change the Bus setup ?.
Since I'm using the Support Package for Raspberry Pi I can't use the Simulink.Bus.createMATLABStruct command.
Thank you in advance Michael
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!