How do you open PDF file in MATLAB on a Linux platform?

12 Ansichten (letzte 30 Tage)
David Waters
David Waters am 11 Feb. 2015
Beantwortet: Wendy Fullam am 9 Jun. 2015
I ported MATLAB code from Windows 7 to CentOS Linux. The "open(<pdf file path name>);" statement that works fine on a Windows platform didn't work on the Linux platform. I can double click on the PDF file in the CentOS File Browser and it immediately open in a PDF reader. The path is correct and there is no exception thrown. I gave it a bad file name and got a file not found exception.
  1 Kommentar
David Waters
David Waters am 5 Jun. 2015
If anybody is interested, the MATLAB open doesn't appear to support PDF files in Linux. I ended up using the CentOS Linux command "evince". Other flavors of Linux may have another command to open PDF files.
if isunix
system(['evince ' help_file_name ' &']);
elseif ispc
open(help_file_name);
else
msgbox(['Open ' help_file_name 'in the operating system'],'Product Help');
end

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Wendy Fullam
Wendy Fullam am 9 Jun. 2015
David answered above: If anybody is interested, the MATLAB open doesn't appear to support PDF files in Linux. I ended up using the CentOS Linux command "evince". Other flavors of Linux may have another command to open PDF files.
if isunix
system(['evince ' help_file_name ' &']);
elseif ispc
open(help_file_name);
else
msgbox(['Open ' help_file_name 'in the operating system'],'Product Help');
end

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by