Coder deleting variable definitions
이전 댓글 표시
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
Walter Roberson
2012년 6월 13일
Adam, as a work-around, could you perhaps put the variable definitions into a different file and #include that file ?
Adam Kaas
2012년 6월 13일
Walter Roberson
2012년 6월 13일
Write the definitions into YourFileName.h. Then at the point in the C code that you need the variables defined, you would put the line
#include "YourFileName.h"
This has the effect of inserting everything from YourFileName.h as-if it had all been typed in at that point in the source.
Walter Roberson
2012년 6월 13일
Note: the double-quote marks are important for the syntax.
Adam Kaas
2012년 6월 13일
Kaustubha Govind
2012년 6월 13일
Adam: Are these variables not being used in the rest of your code? I would expect the variable definitions to be removed only as an optimization.
Adam Kaas
2012년 6월 13일
Walter Roberson
2012년 6월 13일
This would not be an entry-point file.
Kaustubha Govind
2012년 6월 14일
Are the variable zeta and w being used in some part of S1.m?
Adam Kaas
2012년 6월 14일
Adam Kaas
2012년 6월 14일
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?
Adam Kaas
2012년 6월 14일
채택된 답변
추가 답변 (1개)
Rich McKeever
2012년 6월 26일
1 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 DSP Algorithm Acceleration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!