simulink loading matrix to be interpolated

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 comentario

Orion
Orion el 6 de Abr. de 2016
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.

Iniciar sesión para comentar.

Respuestas (0)

Preguntada:

el 6 de Abr. de 2016

Comentada:

el 6 de Abr. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by