フィルターのクリア

Use toolbox function extrinsic

3 ビュー (過去 30 日間)
Jonas Horntvedt
Jonas Horntvedt 2022 年 11 月 11 日
コメント済み: Jonas Horntvedt 2022 年 11 月 15 日
I am using the function csape in matlab. When I am testing it works as it should. When I am implenting the function that contains csape to simulink I do get an error. I can see that to use the function as extrinsic is recommended, but I have troubles implementing the solution. This is how I am using the function. I think I will get the same issue wit fnval. How can I use these functions extrinsic?
y = 30;
x = 0;
yend = 0
xend = 30
inslope = deg2rad(0);
endslope = deg2rad(-90);
xx = linspace(x,xend,100);
pp = csape([x xend],[inslope,[y yend],endslope], 'clamped');
yy = -fnval(pp,xx);

回答 (1 件)

Shreni Malyala
Shreni Malyala 2022 年 11 月 15 日
You can use coder.extrinsic('function') to declare the functions as extrinsic prior to the function call.
% add this line of code before pp = csape([x xend],[inslope,[y yend],endslope], 'clamped');
coder.extrinsic('csape')
% add this line of code before yy = -fnval(pp,xx);
coder.extrinsic('fnval')
  1 件のコメント
Jonas Horntvedt
Jonas Horntvedt 2022 年 11 月 15 日
hmm thank you for the answer. Unfortunately this did not solve my problem. In simulink, i get this error:

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by