- 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')
using an array in a Simulink Matlab function block
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
rubindan
2020-5-20
There are at least 3 ways to do that:
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!