Search code examples
javamatlabmatlab-deployment

Matlab openfig from URL or java input stream


I'm using WebFigures in Matlab and calling the getFig function from Java

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. Is it possible to in Java load the file from the URL and then pass it as some kind of inputstream?


Solution

  • Eventually I just had to download the file using Java and pass in the location to matlab