简体   繁体   English

来自URL或Java输入流的Matlab openfig

[英]Matlab openfig from URL or java input stream

I'm using WebFigures in Matlab and calling the getFig function from Java 我在Matlab中使用WebFigures并从Java调用getFig函数

function df = getFig(file)

  f = openfig(file,'new','invisible');

  figure('Visible','Off')

  df = webfigure(f);
  close(f);
end

This above works when passing a string to a path location, however not when using a URL. 当将字符串传递到路径位置时,上述方法有效,但是在使用URL时无效。 Is it possible to in Java load the file from the URL and then pass it as some kind of inputstream? 在Java中是否可以从URL加载文件,然后将其作为某种输入流传递?

OPENFIG works only with local files. OPENFIG仅适用于本地文件。 Try to use URLWRITE to download the file to some temporary location and then OPENFIG to open that file. 尝试使用URLWRITE将文件下载到某个临时位置,然后使用OPENFIG打开该文件。

最终,我只需要使用Java下载文件并将该位置传递给Matlab

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM