The function 'wrcoef' is not supported for standalone code generation in Simulink

2 ビュー (過去 30 日間)
Ali Deniz Özdemir
Ali Deniz Özdemir 2018 年 11 月 12 日
コメント済み: Jitender Gangwar 2018 年 11 月 26 日
Hello, i wrote a user defined matlab-function for a simulink model where the function 'wrcoef' is called. The simulink diagnostic viewer displays the error: 'The function 'wrcoef' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation.'
Has anybody some advice how to use coder.extrinsic to solve that problem?
  1 件のコメント
Jitender Gangwar
Jitender Gangwar 2018 年 11 月 26 日
Hi Ali,
I understand that you are using wrcoef in MATLAB function block and facing issues.
You can use code.extrinsic as illustrated in the following example:
function c = pythagoras(a,b,color) %#codegen
% Calculates the hypotenuse of a right triangle
% and displays the triangle as a patch object.
c = sqrt(a^2 + b^2);
create_plot(a, b, color);
function create_plot(a, b, color)
%Declare patch as extrinsic
coder.extrinsic('patch');
x = [0;a;a];
y = [0;0;b];
patch(x, y, color);
axis('equal');
If you have already tried this approach, please share the issue/error you encounter if any.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeBodies についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by