我在终端中运行了一个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
等命令,并在网页上查看结果!
答案 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
以下是受影响功能的摘要: