How to include a P-File in Simulink?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey, I'm trying to include a P-file into my Simulink model, but unfortunately it doesn't work. The File needs 2 inputs and generates 1 output. I tried to use the MATLAB Function Block to simply call the P-File:
function y = fcn(m,n)
y = p_file(m,n)
But I receive the error:
P-file '' is not authorized for compilation. To support compilation, please consider using 'coder.allowpcode' in this file. When the file defines a MATLAB class, 'coder.allowpcode' should be added to the class constructor.´
So how can i solve it if i can't edit the P-File and add 'coder.allowpcode'?
Thank you for any suggestions!
0 commentaires
Réponses (1)
Walter Roberson
le 1 Juin 2016
It is not the P-File that you would edit: it would be the .m file that is used to generate the .p file.
If you cannot edit the .m file and regenerate the .p file, then you cannot use the .p file in any of the accelerated modes, only in the very basic Normal mode.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!