using an array in a Simulink Matlab function block
Afficher commentaires plus anciens
I have an array 'Ramp.mat'
This array has some data (4x4 matrix) which I want to use while making the code for Simulink Matlab function block .
May I know which command I can use to use data from mat file.
Had it been a .m file then I could have used load 'Ramp' command , but in this case it is not applicable.
Please help .
1 commentaire
rubindan
le 20 Mai 2020
There are at least 3 ways to do that:
- Load it to workspce and use it as a paraemeter (https://www.mathworks.com/help/simulink/ug/parameter-arguments-in-matlab-function-block-functions.html)
- Insert a "From File" block into the Simulink model and connect it to the matlab function
- Load the array inside your function block with R = load('Ramp')
Réponses (0)
Catégories
En savoir plus sur Modeling 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!