필터 지우기
필터 지우기

Syms function not supported in Simulink

조회 수: 7 (최근 30일)
katherine keogh
katherine keogh 2020년 11월 25일
답변: Kiran Felix Robert 2020년 12월 18일
I have some code i put into a matlab function block on simulink, I need to intergrate a function twice and the orignal function also needs to be differentiated. There is a little more the matlab function block but below is an example. How can I get rid of the error produced? Do I have to do an extrinsic coder thing or should I just use the integrator block to do this block wise?
syms x
int2=(M-Ry*x-((Ww/length)/2)*x^2+(symL/6)*x^3)/1000
RHS=int(int(int2))
This is the error produced
Function 'syms' not supported for code generation.
Component:MATLAB Function | Category:Coder error

답변 (1개)

Kiran Felix Robert
Kiran Felix Robert 2020년 12월 18일
Hi Katherine,
Refer the Code Generation page of the Symbolic Math Toolbox for related Topics and Examples.
Also see the Generate MATLAB Function Blocks from Symbolic Expressions to include symbolic functions for Code Generation in Simulink through the matlabFunctioncommand

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by