Matlab Function Block compilation errors with variable-step solver and try and catch
Mostrar comentarios más antiguos
Hi,
I'm looking to create a function block in Matlab because it seems like a quick alternative. I wrote code that works when put in the MatLab Command Window (quite simple code in fact). Though when I compiled it, I got an error saying it cannot be used with a variable-step solver (using grt.tlc compiler). I changed my compiler for rsim.tlc as suggested, but then I get this weird "Try and catch are not suppoert for code generation" error on line 1, column 1, "fun" ....
which is :
function dI = fcn(Tensions, Time, RotationSpeed)
%#codegen
...
All my function does is creating a small matrix using inputs and workspace variables and inversing the created matrix.
Also know that I must use variable-step solver.
Thanks a lot!
Jessy
1 comentario
Kaustubha Govind
el 23 de Mayo de 2013
Are you using try/catch in your function? Also, what functions do you use to create the matrix and invert it? Make sure that you are only using functions supported for code generation.
Respuestas (0)
Categorías
Más información sobre MATLAB Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!