using an array in a Simulink Matlab function block
Show older comments
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 Comment
rubindan
on 20 May 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')
Answers (0)
Categories
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!