MATLAB Compiler でコンパイルされたアプリケーションから PDF を開くにはどうすればよいですか?

2 views (last 30 days)
Windows 環境にインストールされた MATLAB を使用しています。
App Designer で作成した GUI のコールバックでは、以下のように PDF ファイルを開くために open 関数を使用しています。
>> open('USER_MANUAL.pdf')
この GUI を MATLAB Compiler でコンパイルし、配布先で実行すると、PDF ファイルを開くことができません。コンパイルしたアプリ上のコールバック関数で PDF を開く方法を教えてください。

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Nov 2022
Edited: MathWorks Support Team on 17 Nov 2022
残念ながら、open 関数は MATLAB Compiler ではサポートされていません。
(参考)MATLAB Compiler と MATLAB Compiler SDK でのコンパイルでサポートされていない関数
https://jp.mathworks.com/help/compiler/unsupported-functions.html
open 関数の代わりに、winopen 関数をご利用ください。
>> winopen('USER_MANUAL.pdf')
winopen 関数は、ファイルの拡張子に関連付けられたアプリケーションでファイルを開くことが可能です。
・winopen 関数
なお、アプリケーションコンパイラ(deploytool) でパッケージ化する際には、[アプリケーションの実行に必要なファイル]に PDF を手動で追加してください。

More Answers (0)

Categories

Find more on 環境と設定 in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!