This stackoverflow post states that some functions, these could be even matlab built-in functions, cannot generate auto-code. It suggests the use of 'extrinsic' to avoid this issue.
Shri On Jul 23, 2013, at 5:31 PM, Fang-Yu Liu <[email protected]> wrote: > Hi all, > > I'm trying to add power flow analysis to my simulink model. > I added a MATLAB function in simulink and run matpower command such as load > case, runpf, eta. > However, I received this errors: > > Try and catch are not supported for code generation. > > > Function 'loadcase.m' (#54.4881.5039), line 129, column 13: > "try \%% assume it returns a struct" > Launch diagnostic report. > Does anybody familiar with running matpower in Simulink? Could you guys give > me some hints about how should I fix it? > Thanks! > > Fang-Yu
