Matlab Coder and saving variables to a file
이전 댓글 표시
How can I dump of variables to a file using Matlab Coder? It complains that fopen can't be used for this (I don't want to do coder.extrinsic).
Also, somewhat related, is there a way to inject C code into an m-file such that when Coder tries to generate code it simply copies that C code over to the C file unprocessed?
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 8월 24일
0 개 추천
Could you use coder.extrinsic('#include "source_to_inject.h"')
댓글 수: 2
Kaustubha Govind
2011년 8월 25일
Walter: No. The coder.extrinsic directive is used to call MATLAB functions unsupported for code generation. Desiree's suggestion of using coder.ceval is the right approach.
Walter Roberson
2011년 8월 25일
Thanks. I haven't read enough messages about coder.* yet to have the pieces straightened out yet.
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!