Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how can i display an image from a matlab m-file code on an html page.Please i need the code syntaxe.

Asked by akukulong nkeh colins on 19 Sep 2013

I am tryinng to deploy a complex matlab gui created using guide on a web page through matlab webserver and the code syntaxe i used displays numerical values instead of a figure.the code syntaxe i used is shown below:

% Write the figure file

%Render jpeg and write to file

PlotFile = sprintf('result%s.jpeg', InputSet.mlid);

drawnow;

wsprintjpeg(Fig, PlotFile);

close(Fig);

templatefile = which('deepwimax2.html');

if ( exist('OutFile','var') == 1 )

% write Page to a diagnostic file

s.GraphFileName = [ PlotFile];

PageString = htmlrep(s, templatefile, OutFile);

else

s.GraphFileName = ['/icons/' PlotFile];

PageString = htmlrep(s, templatefile);

end

where 'result' represents the last line of my m-file code to plot the figure as shown below:

%plot the grapgh

result=berplot(SNR,bit_error_rate,rate_id)

why is that when i load the page url in my browser, the figure resulting from result doesn't display.Can someone please tell me where i have gone wrong or is there a line code which i haven't well interpreted or whatever?

THANKS FOR ANY ANSWERS IN ADVANCE

0 Comments

akukulong nkeh colins

0 Answers

Contact us