I cannot generate C code from MATLAB Coder

2 ビュー (過去 30 日間)
SimTec
SimTec 2020 年 10 月 12 日
コメント済み: SimTec 2020 年 10 月 21 日
I would like to generate C code for a PI controller, but whenever I reach this step I cannot continue any longer. I watched a video from MATLAB, but that one has testbench which I do not need here.
%#codegen
function [PIout,yint] = PI_cont(err,ki, kp,yr)
yint=ki*err+yr; % yint=ki*err/s
PIout=yint+kp*err;
Here, you find how I stored the integral yint into yr
  9 件のコメント
SimTec
SimTec 2020 年 10 月 16 日
Thank you, wait a moment
SimTec
SimTec 2020 年 10 月 21 日
NOw it is working

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

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by