Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Automated Latex report of calculations: works in full Matlab, does not work in standalone ?

Asked by Steven

Steven (view profile)

on 12 Dec 2012
  • Context: I developed a calculation tool for image processing. The program runs through a GUI. I made the tool available for my colleagues in other divisions worldwide by deploying the script to a standalone .exe-file.
  • Goal: To be able to have an automated report print out of the results.
  • How: I create a .tex-file in the script for this, using code like
     fid = fopen('Report.tex','w');
     ...%%%code to include the graphs and numbers saved in the Matlab-scripts
     ...%%%in the .TeX-code   
     dos(['pdflatex Report -job-name='])
  • Problem: This works perfectly when running the script in 'full' Matlab mode. IN STANDALONE MODE HOWEVER, the script does not manage to write the .TeX-script.
  • Question: Does anyone know how to solve this ? Is there any specific measure I must take/package to load/.... in order to be able to write a .tex-file in standalone mode ?

Many thanks for any help !



Steven (view profile)


No products are associated with this question.

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 12 Dec 2012
Accepted answer

Are you sure that it does not produce the file, but in a directory that you do not expect? The current directory for standalone executables is not the directory that you launch the executable from. You would be safer to use uiputfile() to have the user select the directory and filename.



Steven (view profile)

on 12 Dec 2012

Good point, will check on that.

Thanks for the suggestion.


Steven (view profile)

on 13 Dec 2012

Worked out wel..many thanks Walter !!!

Walter Roberson

Walter Roberson (view profile)

Contact us