I cannot generate C code from MATLAB Coder

3 Ansichten (letzte 30 Tage)
SimTec
SimTec am 12 Okt. 2020
Kommentiert: SimTec am 21 Okt. 2020
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 Kommentare
SimTec
SimTec am 16 Okt. 2020
Thank you, wait a moment
SimTec
SimTec am 21 Okt. 2020
NOw it is working

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Fixed-Point Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by