Coder fails due to missing file that should be read while running

조회 수: 7 (최근 30일)
Michael  A
Michael A 2016년 11월 8일
편집: Michael A 2016년 11월 9일
My code has a section that reads a mat file, if it exists, and loads parameters from it. The file should be loaded only if it exists, otherwise just use default values, and no matter if it's matlab code running or the generated one (matlab code works properly).
While trying to generate c code it fails if this file is missing. This file should not be a part of the code generation. Could you help me understand the problem? I'm using version 2015a.
Thanks

답변 (1개)

Robert
Robert 2016년 11월 8일
You could wrap that part in if isdeployed
  댓글 수: 1
Michael  A
Michael A 2016년 11월 8일
편집: Michael A 2016년 11월 8일
Thanks, but why would it help? The file can be missing or exists no matter if it's running matlab code or the generated code. I'll edit my question so it will be clear.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by