1
votes

I am building a reduced order observer in MATLAB. The matrices are calculated using functions/script files outside matlab and simulink function blocks are using these functions to calculate values.

The problem is that some commands like 'acker', 'place' etc which used to work on command window/function/script files are not working in simulink function block and showing errors.

I tried using simin block to take these matrices from workspace but it is also showing errors which I can't understand.

Thanks for your help.

1
If you post the code that's causing you issues along with the full details of the errors you're getting the community will be better equipped to help you :) - Neil Mountford

1 Answers

2
votes

If I get your question correctly then, from User defined functions, you could add a Matlab function block with the following code:

function fcn(in)
%#codegen

coder.extrinsic('acker', 'place')

# Now you can use acker, place so add more code.