"arguments ... end" syntax input argument validation module group supports C code generation?

조회 수: 2 (최근 30일)
The latest version of Matlab Coder does not seem to support the use of "arguments...end" module in functions. If so, I don't have to specify the type and size of each input argument before calling the "codegen" function?
I hope this will be enhanced in future versions!
-------2022.3.24 update--------
try/catch shoud also support C code generation.
  댓글 수: 6
Gregory Warnes
Gregory Warnes 2022년 5월 7일
An example I just tried to use:
function [a, b, c, d, e]=myfun(find_file)
arguments
find_file (1,1) logical = true
end
Richard McCormack
Richard McCormack 2022년 5월 10일
Thank you for the example, Gregory! Please keep an eye out for future releases of MATLAB Coder, we hope to get this feature to you soon.

댓글을 달려면 로그인하십시오.

채택된 답변

xingxingcui
xingxingcui 2022년 10월 10일
편집: xingxingcui 2024년 4월 27일
It is good to hear that this syntax supports C/C++ code generation since R2022b .
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com
  댓글 수: 2
Matan Silver
Matan Silver 2023년 9월 26일
Just an update for future readers: In addition to supporting the arguments block in general for code generation (R2022b), starting in R2023b there is now support for omitting "-args" if you have a fully specified arguments block:
xingxingcui
xingxingcui 2023년 9월 27일
@Matan Silver Thanks to you guys for adding timely comment annotations, R2023b is getting more and more compliant with the human touch!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by