Coder deleting variable definitions
2 次查看(过去 30 天)
显示 更早的评论
Why oh why does coder feel the need to delete my variable definitions from time to time? It is unbelievably frustrating having to redefine 200+ variables.
13 个评论
Kaustubha Govind
2012-6-14
Adam: I think I'm a little confused about your workflow. Perhaps you should consider sending your files and reproduction steps to MathWorks Tech Support and verify if this is expected behavior or a bug?
采纳的回答
Fred Smith
2012-6-26
Hi Adam,
Sorry to hear about your frustration. If you have 200 variables you might want to consider a different approach.
Have you looked at using codegen from the command-line instead of the UI? You can use "pre-conditioning" to incorporate your type definitions directly into your MATLAB code. This mechanism is verbose but solid. In many cases you can auto-generate the pre-conditions using some helper scripts. This feature is also available through the UI as of R2012a although it is somewhat hidden in the Settings dialog.
Another possibility in the UI, is to define your inputs by example. If you have appropriates variables in the base workspace, MATLAB coder can automatically figure out the types from those.
Hope this helps,
Fred
更多回答(1 个)
Rich McKeever
2012-6-26
Adam,
We saw your post about the issue here and fixed the bug yesterday. A patch is available here, but I also second Fred's suggestion of using other methods for defining large numbers of inputs.
Thanks,
Rich
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!