matlab compiler r2011a problem with both edit and figure/plot

1 回表示 (過去 30 日間)
A Huang
A Huang 2011 年 7 月 30 日
I use "mcc -m test.m" for the following to build a standalone executable, but it ran into Java error during execution.
function []=test() edit(); figure(1); plot([1 2 3],[4 5 6]);
Any idea to make both edit and figure/plot work after compilation? I am using R2011a.

回答 (2 件)

Walter Roberson
Walter Roberson 2011 年 7 月 30 日
You cannot compile calls to "edit". figure() and plot() should be okay though.
Please see here

A Huang
A Huang 2011 年 7 月 30 日
By copying edit.m to a local directory, I can compile edit (and execute successfully) without figure/plot. It just seemed that there's a Java conflict between edit and figure/plot during execution.
  3 件のコメント
A Huang
A Huang 2011 年 7 月 31 日
I just wanted to display the content of a file before plotting it. Is there a text viewer that can compile in Matlab?
Walter Roberson
Walter Roberson 2011 年 7 月 31 日
You can use a uicontrol of style edit, with 'enable' set to 'disable'. That will give you a text region with a vertical scroll bar but no edit facility.
If you need horizontal scrolling as well, there are MATLAB File Exchange contributions that provide horizontal and vertical scrolling for text.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCard games についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by