Matlab function block parsing error

I have a matlab function block that solves the heat trasfer in a system using a finite difference scheme that I want to implement in a simulink system model. When i try to implement the code in a matlab function block I get the following error:
Errors occurred during parsing of MATLAB function 'Membrane1'(#144)
I has seen other folks have similar issues when variables are not preallocated correctly, but I don't think that is the issues here as all my inputs, outputs, and intermediates are preallocated.
I also don't think I am using any opperaters not supported by #codegen
Attached is the full code and an image of the way the matlab function block is connected. Please let me know if you have any ideas.

1 Comment

As it turns out I was very close to finding the answer when I posted this. The issue was that, using xcode5, the default mexopts.sh must be edited. For anyone else having this problem a complete description of the solution can be found here: http://www.mathworks.com/matlabcentral/answers/103904

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 10 Dec 2013

Commented:

on 10 Dec 2013

Community Treasure Hunt

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

Start Hunting!