CAPTAIN Toolbox - fwrite problem
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, I am trying to run the dlrdemo from CAPTAIN Toolbox but encountered a fwrite problem. I have ensured that the directory has "write" access but don't know what else is wrong. Any help or advise you could provide will be much appreciated.
nvr=dlropt(y, z, TVP)
??? Error using ==> fwrite
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ==> C:\captain\captreg.p>captreg at 153
Error in ==> C:\captain\kalmsmo.p>kalmsmo at 47
Error in ==> C:\captain\dlrfun.p>dlrfun at 89
Error in ==> fminsearch at 205
fv(:,1) = funfcn(x,varargin{:});
Error in ==> C:\captain\dlropt.p>dlropt at 312
Error in ==> dlrdemo at 59
nvr=dlropt(y, z, TVP)
??? Error while evaluating uicontrol Callback
I have ensured that the directory is writable
attrib -r +s c:\captain
댓글 수: 1
Oleg Komarov
2011년 8월 9일
Please format your code/error message: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099
채택된 답변
dbstop
2012년 8월 5일
Hi there,
I just ran into the same problem. The trouble is that on Windows machines the toolbox attempts to write 2 configuration files directly into the Windows folder (matlabrf.ini and ctfst20.ini). For good reasons administrators often deny ordinary users write access to this folder, which leads to failure of fopen() which is NOT captured within the toolbox code. Naturally fwrite() fails subsequently causing the error.
Fix it by giving sufficient writing privileges to your user. Removing these rights again after a first run seems to work well so far.
To the developers of the toolbox: Why don't you just put your configuration files in a better place? It would be much better programming style. Also capture fopen() errors in future versions of the toolbox.
Cheers
댓글 수: 0
추가 답변 (1개)
Rajiv Singh
2011년 8월 9일
This is a third party product whose developers might not be watching MATLAB answers. You might have better luck reaching them through their website.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!