clearvars function in simulink function block
Afficher commentaires plus anciens
The function in a simulink function block calls another function which has an instruction given below:
clearvars -global Downsample DATAPADDING_MSECS SEARCHBUFFER Fs WHOLE_SIGNAL Align_Nfft Window
This function is giving an error:
Function 'clearvars' not supported for code generation.
I have used
coder.extrinsic("clearvars");
But the error persists, what should I do?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 10 Sep 2024
1 vote
Compiled models use static allocation for global variables. Asking to clear the global would be asking to release the static memory. This is unlikely to make the memory available for use, as the allocations for dynamic memory would be a different part of the address space.
1 commentaire
Sania Gul
le 10 Sep 2024
Catégories
En savoir plus sur Simulink Environment Customization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!