フィルターのクリア

MATLAB Function Interface Error: Error calling MATLAB function 'sim'

2 ビュー (過去 30 日間)
Imran Kanjoo
Imran Kanjoo 2016 年 5 月 26 日
コメント済み: XIN HE 2019 年 6 月 5 日
I am calling sim function in a user defined matlab function block to test the inputs using neural network trained data stored in 'net' variable, I get this error
MATLAB Function Interface Error: Error calling MATLAB function 'sim'. Block Neural Network Function (#108) While executing: none
My code is
function [tau1p,tau2p] = Nntwork(theta1,theta1d,theta2,theta2d,theta1dd,theta2dd)
coder.extrinsic('load');
coder.extrinsic('sim');
net=load('trainednet.mat');
a=sim(net,[theta1;theta1d;theta1dd;theta2;theta2d;theta2dd]);
tau1p=1;
tau2p=a2;
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 6 月 5 日
I wonder if the difficulty is related to the fact that sim() is a method of neural networks but also the function to invoke simulink ?
Code generation does not appear to be possible with the neural network sim method, so this code would not work with rapid acceleration turned on.
XIN HE
XIN HE 2019 年 6 月 5 日
Thanks. Your answer makes some sense. I think mabye I have to try some other ways.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by