Problem Plot() function in java!

hello,
I created my jar file througs java builder then imported my java project.Then I created my object and method( object.MyDrawFunction() like..) but when i run my project it is not showing pop up form.I'm waiting your solutions.Thanks..
function [] = MyDrawFunction()
x=-12*pi:0.1:12*pi;y=sin(x./3)+cos(x./2);plot(x,y);
end

回答 (1 件)

Friedrich
Friedrich 2013 年 1 月 2 日

0 投票

Hi,
I guess are test application is pretty short, so I guess the MCR is closed together with your application. In order to prevent this see here:

2 件のコメント

emre karakoc
emre karakoc 2013 年 1 月 3 日
編集済み: emre karakoc 2013 年 1 月 3 日
Hi,primarily thank you,
I looked your link,so i think we can not use matlab graphic method with JFrame and Java Window Application or is it posssible?
Last question is that what's MCR? How can i open it with application? Because normally when i run my application,it soo slow on the first try.. i wonder it is related with MCR?
Walter Roberson
Walter Roberson 2013 年 1 月 3 日
MCR is MATLAB Component Runtime. It is more or less MATLAB without the command line or fancy display. The first time you start any application it needs to unpack the Component Technology Files and start up MCR, so Yes, that tends to be slow. And then times after that, if it finds the files already unpacked and verifies they are unchanged, then it will not need to unpack them again but it will still need to start MCR. Starting MCR is, in itself, very close to the same time as starting MATLAB would be.

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

カテゴリ

ヘルプ センター および File ExchangeJava Package Integration についてさらに検索

質問済み:

2013 年 1 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by