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!