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!