MATLAB :: -nojvm启动选项不再支持此功能

时间:2016-09-15 21:02:12

标签: php matlab shell ubuntu terminal

我在终端中运行了一个Matlab代码,因为稍后我需要在php中调用它。但是我得到了这些错误:

jalal@klein:~/Desktop/v1.2$ matlab -nojvm < matlab.m

错误:

L2 norm on unsampled vertices: 0.096158
>> >> >> >> >> >> Error using figure
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

>> Error using gcf
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in newplot (line 63)
    fig = gcf;

Error in scatter>localGetAxesInfo (line 102)
    cax = newplot(cax);

Error in scatter (line 82)
        [~,parax] = localGetAxesInfo(cax);

>> >> >> >> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in title (line 22)
    ax = gca;

>> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in hold (line 34)
    ax = gca;

>> >> >> Error using figure
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

>> Error using gcf
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in newplot (line 63)
    fig = gcf;

Error in scatter>localGetAxesInfo (line 102)
    cax = newplot(cax);

Error in scatter (line 82)
        [~,parax] = localGetAxesInfo(cax);

>> >> >> >> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in title (line 22)
    ax = gca;

>> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in hold (line 34)
    ax = gca;

>> >> Error using figure
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

>> Error using gcf
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in newplot (line 63)
    fig = gcf;

Error in scatter>localGetAxesInfo (line 102)
    cax = newplot(cax);

Error in scatter (line 82)
        [~,parax] = localGetAxesInfo(cax);

>> >> >> >> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in title (line 22)
    ax = gca;

>> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in hold (line 34)
    ax = gca;

>> >> Error using figure
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

>> Error using gcf
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in newplot (line 63)
    fig = gcf;

Error in scatter>localGetAxesInfo (line 102)
    cax = newplot(cax);

Error in scatter (line 82)
        [~,parax] = localGetAxesInfo(cax);

>> >> >> >> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in title (line 22)
    ax = gca;

>> Error using gca
This functionality is no longer supported under the -nojvm startup option. For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in hold (line 34)
    ax = gca;

您能否指导我如何解决这个问题,或者我如何从PhP运行Matlab代码?目前我可以从php运行ls -ltr等命令,并在网页上查看结果!

2 个答案:

答案 0 :(得分:2)

您已在最新版本的MATLAB中禁用了图形所需的JVM。如果您需要图形但不想要IDE,则可以使用-nodesktop -nosplash启动MATLAB。 -nosplash选项确保不显示MATLAB初始屏幕。

matlab -nodesktop -nosplash

答案 1 :(得分:2)

根据您收到的错误消息,不再支持使用-nojvm处理图形处理。您应该使用-nodesktop代替。

在您的环境中,它应该是:

jalal@klein:~/Desktop/v1.2$ matlab -nodesktop < matlab.m

http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6

以下是受影响功能的摘要:

  • 创建图形并执行绘图任务,例如使用绘图,轴,getframe和gcf函数。
  • 打印图形并使用相关功能,如print,hgexport和saveas。
  • 使用诸如warndlg之类的GUI构建函数在MATLAB中创建GUI。 使用Simulink示波器和打印Simulink模型。