simulink loading matrix to be interpolated

2 次查看(过去 30 天)
In matlab .m code I load a 2D aerotable using the load operator. Does not work in simulink -- Using a Matlab function block with load command, load can't find the file although .m code can.
function block code is:
function Cq = CqRead Cq = load('/filepath/filename');
and I get error code : Failed to locate file '/filepath/filename' specified in the load function.
Yes, I have checked the path and name and they are good.
Loading into workspace not a solution since goal is to compile the code into C and add to a larger simulation.
Any solutions? Please?
  1 个评论
Orion
Orion 2016-4-6
It's not clear.
What kind of data is stored in your mat file ? a Matrix n by m ?
And what do you want to do with it ?
Using a Matlab function block may be not the better way to do it.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by