|MATLAB Web Server|
webpeaks function, included as a demonstration program, creates a
peaks plot and returns the output to your Web browser. In examining portions of the
webpeaks code, you will see how to include MATLAB graphics as part of a MATLAB Web Server application.
To start the
webpeaks demonstration, set the URL in your browser to
webpeaks input document.
This input document allows you to set the characteristics of the
peaks plot you want to generate. This is a more complex input document than the one we used with
webmagic, as it makes use of HTML frames. The code in the source file
webpeaks function and targets the output to a frame on the lower portion of the input document itself.
In addition to the code necessary to compute and display the
peaks function, the file
webpeaks.m contains additional code specific to the transmission of graphics data across the Web. In
webpeaks.m the code
mlid from the structure
mlid is a unique identifier that
matlabserver provides. Using the value of
mlid to construct filenames ensures that filenames are unique. It can also be used to maintain contexts among the different connections in an application.You can see this in the code
which creates a name for a
jpeg file. If
mlid has the value
ml00277, for example, the
jpeg file will be named
htmlrep replaces MATLAB variable names it finds in the HTML output template file
webpeaks2.html with the values in the input structure
$GraphFileName$, the variable that represents the graphic output, is found in the line
The final output document shows both the input and output frames.
When the input form contains a "clickable" image created by an |
|Additional Application Examples||Stock Price Simulation|