Can we put syms function in matlab function block of simulink

1 回表示 (過去 30 日間)
sabyasachi Neogi
sabyasachi Neogi 2016 年 10 月 4 日
回答済み: Dimitris Iliou 2016 年 10 月 12 日
function y = fcn(x_storage,K) %#codegen % for a boiler for i=1:1:500 U_star(:,i)=(x_storage(14,i))-(K(1,:,i)*(X_bar(i,:)')); end y = U_star;
In this code X_bar is a symbolic function and finally the U_star will be symbolic.I'm getting a simulink.signal object error which is not resolving even after i uncheck the checkbox of 'Data store name must resolve to Simulink signal object' option.Is there a way to put a symbolic expression in matlab function block ?

回答 (1 件)

Dimitris Iliou
Dimitris Iliou 2016 年 10 月 12 日
My understanding is that you want to pass a symbolic expression as an input to a ‘MATLAB function block’ and then, get a symbolic expression as an output from that block.
This can be done from the command line by adding the ‘MATLAB function block’ to a model, as explained below:

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by