Oscar Lopez wrote:
BcBob wrote:
The matlab code and a sample Lyx document are in the attached zip file.
Bob
http://n2.nabble.com/file/n2865240/matlab2tex.zip matlab2tex.zip
However, I tried to test a simple matlab file, following the notes on
the lyx file, and I got the following error:
Ok, it seems that it works when the absolute path is specified. For instance
>>pwd
ans =
/home/oscar
>> matlab2tex('foo.m')
??? Error using ==> fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ==> highlight>write_highlighted_code at 126
fprintf(outfid,out_format.pre_start);
Error in ==> highlight at 110
write_highlighted_code(mfid,outfid,opt)
Error in ==> matlab2tex at 57
highlight(mfile,opt,fid);
despite the fact that foo is in matlab current directory.
However,
>> matlab2tex('/home/oscar/foo.m')
works like a charm.
Sorry for the noise.
Best regards