Main Content

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

알고리즘 설계 기본 사항

코드 생성을 위한 알고리즘 설계 관련 고려 사항, 생성된 코드의 동작

MATLAB® 알고리즘에서 코드를 생성하면 완전히 MATLAB 작업 공간 내에서 소프트웨어를 설계하고 구현하며 테스트할 수 있습니다. 가능한 작업:

  • 알고리즘이 코드 생성에 적합한지 확인할 수 있습니다.

  • 효율적이고 읽기 가능하며 간소한 C/C++ 코드를 자동으로 생성하여 수동 변환을 없애고 코드에 오류가 발생할 위험을 최소화할 수 있습니다.

  • 데이터형 관리, 메모리 사용, 속도 등 데스크탑과 임베디드 애플리케이션의 특정 요구 사항을 고려하여 MATLAB 코드의 설계를 수정할 수 있습니다.

  • 생성된 코드를 테스트하고 수정된 알고리즘이 원래 MATLAB 알고리즘과 기능적으로 같은지 손쉽게 확인할 수 있습니다.

  • MEX 함수를 생성하여 MATLAB 알고리즘을 가속화하거나 고정소수점 MATLAB 코드의 속도를 높일 수 있습니다.

  • MATLAB 코드에서 하드웨어 기술 언어(HDL)를 생성할 수 있습니다.

함수

coder.allowpcodeP 코드 파일로부터 코드 생성
coder.cevalCall C/C++ function from generated code
coder.cincludeInclude header file in generated code
coder.cstructnameName C structure type in generated code
coder.extrinsic함수를 외재적 함수로 선언하고 MATLAB에서 실행
coder.inlineControl inlining of current function in generated code
coder.inlineCallInline called function in generated code (R2024a 이후)
coder.loadLoad compile-time constants from MAT-file or ASCII file
coder.nonInlineCallPrevent inlining of called function in generated code (R2024a 이후)
coder.nullcopy코드 생성 시 초기화되지 않은 변수 선언
coder.opaqueDeclare variable in generated code
coder.refIndicate data to pass by reference
coder.screenerDetermine if function is suitable for code generation
coder.rrefIndicate read-only data to pass by reference
coder.targetDetermine if code generation target is specified target
coder.unrollUnroll for-loop by making a copy of the loop body for each loop iteration
coder.varsizeDeclare variable-size data
coder.wrefIndicate write-only data to pass by reference
coder.updateBuildInfoUpdate build information object RTW.BuildInfo

클래스

coder.ExternalDependencyInterface to external code
coder.BuildConfigBuild context during code generation

도움말 항목

문제 해결

Unknown Output Type for coder.ceval

Define the output type for external C/C++ function calls.