How to prevent MATLAB Coder from breaking up input structures
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Paul Silversmith
le 15 Juin 2020
Modifié(e) : Anmol Dhiman
le 30 Juin 2020
MATLAB Coder will sometimes treat a subset of the fields of an input structure as individual inputs. How can I direct MATLAB Coder to always pass the entire structure?
e.g.
struct.A = 1; struct.B = 2; struct. C = 3
[output] = myfunction(struct)
MATLAB Coder will sometimes generate code as follows:
[output] = myfunction(struct_A,struct_B)
0 commentaires
Réponse acceptée
Anmol Dhiman
le 23 Juin 2020
Modifié(e) : Anmol Dhiman
le 30 Juin 2020
Hi Paul,
This is an optimization that occurs by default when generating code and may be disabled in certain circumstances. To determine whether this will work for you, please reach out to MathWorks technical support.
Regards,
Anmol Dhiman
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!