Supported Matlab Functions in Simulink

5 次查看(过去 30 天)
Hello, I have a simulink simulation that is keeping track of the Julian Date through out the simulation.
At one point in the sim, I need to convert the Julian Date to a decimal year. The equivalent code in MATLAB would be:
decimal_year = decyear(Julian_Date - 1721058.5);
decyear is a built-in matlab function, however I'm getting an error saying that decyear is not valid for code generation.
I am aware that this is the case, however I do not need to generate any code involving the conversion and have since removed the %#codegen line in the embedded matlab function.
The problem is I'm getting the same error again. Is there anyway to solve this problem so I can use the decyear function in simulink?

采纳的回答

Guy Rouleau
Guy Rouleau 2013-5-20
Use coder.extrinsic if you do not need to generate code.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by