MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Installation Guide

Browse online or download Installation Guide for Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE. MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Installation guide User Manual

Computation
Visualization
Programming

For Use with MATLAB

®

MATLAB Web Server

Version 1

MATLAB Web Server

PDF file · ·

Print

Print document

Sharing

Summary of Contents

Page 1 - MATLAB Web Server

Computation Visualization Programming For Use with MATLAB ® MATLAB Web Server Version 1 MATLAB Web Server

Page 2 - How to Contact The MathWorks:

How to Contact The MathWorks: www.mathworks.com Web comp.soft-sys.matlab Newsgroup [email protected] Technical support [email protected]…

Page 3 - Contents

Contents Preface About This Book vi Organization of the Document vi Typographical Conventions vii Related Products viii MATLAB on the Web Introduction…

Page 4

ii Contents Getting Started Introduction 2-2 Templates 2-2 Creating Input Documents 2-4 Input Template 2-4 Creating MATLAB Web Server M-Files 2-7…

Page 5 - Selected Bibliography

iii Reference Function Summary 4-2 htmlrep 4-3 matweb 4-6 wscleanup 4-7 wsprintjpeg 4-8 wssetfield 4-9 Directory Structure Troubleshooting Web Server…

Page 6

iv Contents

Page 7

Preface About This Book vi Organization of the Document vi Typographical Conventions vii Related Products viii

Page 8

Preface vi About This Book This book describes the MATLAB ® Web Server. The MATLAB Web Server lets you deploy MATLAB based applications over a network…

Page 9 - Typographical Conventions

Typographical Conventions vii Typographical Conventions This manual uses some or all of these conventions. Item Convention Used Example code Monospace…

Page 10 - Preface

Preface viii Related Products The MATLAB Web Server requires MATLAB Release 11 or later. No other MathWorks-supplied software is required. See…

Page 11 - Related Products

Related Products ix MATLAB C/C++ Graphics Library for automatically compiling MATLAB programs that contain graphics and graphical user interfaces…

Page 12

Preface x

Page 13

Introduction 1-2 MATLAB Web Server Environment 1-2 Building MATLAB Web Server Applications 1-3 Product Requirements 1-5 Web Requirements 1-5…

Page 14

Introduction MATLAB Web Server Environment The MATLAB ® Web Server enables you to create MATLAB applications that use the capabilities of the World…

Page 15 - Introduction

Introduction 1-3 In a more complex network, the Web server daemon can run on a machine apart from the others. Building MATLAB Web Server Applications…

Page 16

3 Write a MATLAB M-file that: a Receives the data entered in the HTML input form. b Analyzes the data and generates any requested graphics. c Places…

Page 17 - Web Server

Product Requirements 1-5 Product Requirements The MATLAB Web Server has the same supporting hardware and software requirements as MATLAB itself…

Page 18

Installation Availability The MATLAB Web Server is available on UNIX (Solaris) workstations and IBM PC compatible computers running Microsoft Windows…

Page 19 - Installation

Installation 1-7 -m 1 This number represents the number of MATLABs that can run concurrently. After testing that everything is working properly, you…

Page 20

Copy matweb.conf in <matlab>/toolbox/webserver/wsdemos to the directory aliased by /cgi-bin or equivalent. Copy all demo HTML files in…

Page 21

Installation 1-9 at the command prompt to see detailed information about a specific script. After completing the MATLAB and MATLAB Web Server…

Page 22

3 Open the copied file in a text editor and follow the directions for modifying the file. Save and close the file when you are done.

Page 23 - Startup Sequence

Installation 1-11 4 Solaris users should create a link in the rc directory associated with run level 3. cd /etc/rc3.d; ln -s ../init.d/webserver…

Page 24

Deinstallation To remove MATLAB Server from the Windows NT Registry, open a command prompt (MS-DOS) window. Enter the command sequence cd…

Page 25 - Graphics Display

Graphics Display 1-13 Graphics Display We recommend that Solaris/Linux users use Virtual Network Computing (VNC) for their X display. VNC can be used…

Page 26

The file directory created contains a README file that discusses how to install the software. The directory contains four files vncviewer vncserver…

Page 27 - Stopping VNC

Graphics Display 1-15 The first time you run the vncserver, you will be prompted for a password. This password controls access to the VNC viewer…

Page 28

webstart -display :1 [webstart]:Calling webdown to take down MATLAB Web Server . . . No server to take down . . . [webstart]:Calling webboot to start…

Page 29

Introduction 2-2 Templates 2-2 Creating Input Documents 2-4 Input Template 2-4 Creating MATLAB Web Server M-Files 2-7 M-File Template 2-7 Creating…

Page 30

Introduction The process of creating a MATLAB Web Server application involves the creation of: An HTML input document for data submission to MATLAB.…

Show all 86 pages
Page 31

Introduction 2-3 webmagic1.html: the webmagic input document webmagic2.html: the webmagic output document webmagic.m: the webmagic MATLAB M-file…

Page 32

Creating Input Documents Input Template The file input_template.html provides the code needed to create a MATLAB Web Server input document. An…

Page 33 - Creating Input Documents

Creating Input Documents 2-5 <p><input type="submit" name="Submit" value="Submit"></p> <!-- STEP 5 Add the name of your main application function to…

Page 34

To display the input document and run the magic squares demonstration locally on your computer, start your Web browser and set the URL to…

Page 35 - M-File Template

Creating MATLAB Web Server M-Files 2-7 Creating MATLAB Web Server M-Files M-File Template You use the M-file template to code your MATLAB application…

Page 36

% created and the filename you created from OUTPUT_TEMPLATE.HTML. % Replace <OUTPUT_TEMPLATE.HTML> with the name of the HTML output % file you created…

Page 37 - (Step 6)

Creating MATLAB Web Server M-Files 2-9 % Create magic square in output structure OUTSTRUCT. outstruct.msquare = magic(msize); % Get column, row, and…

Page 38

Creating Output Documents Output Template The file output_template.html provides the code needed to create a MATLAB Web Server output document. An…

Page 39 - Creating Output Documents

Creating Output Documents 2-11 The source for the webmagic2.html template document looks like <!-- HTML output template used by webmagic.m in call to…

Page 40

When displayed in a browser, webmagic2.html looks like

Page 41 - Debugging Your Application

Debugging Your Application 2-13 Debugging Your Application Debugging Procedure You can use the MATLAB debugging facility plus your Web browser to…

Page 42

outfile in this case is twebmagic.html, the second argument passed to webmagic. The second step in debugging is to use your Web browser to examine…

Page 43 - Data Display

Additional Application Examples 2-15 Additional Application Examples The easiest way to learn how to create MATLAB applications that send and receive…

Page 44

The URL for the players example is http://<your_domain>/cgi-bin/matweb.exe?mlmfile=players& on Windows NT. (On Solaris/Linux use matweb instead of…

Page 45

Additional Application Examples 2-17 This input document allows you to set the characteristics of the peaks plot you want to generate. This is a more…

Page 46

also be used to maintain contexts among the different connections in an application.You can see this in the code s.GraphFileName =…

Page 47

Additional Application Examples 2-19 Note When the input form contains a “clickable” image created by an <input> tag of the form <type = "image" name…

Page 48

Stock Price Simulation Now that you are familiar with the use and operation of the MATLAB Web Server, look at webstock, a program that uses MATLAB to…

Page 49 - Inside the MATLAB

Inside the MATLAB Web Server Components 3-2 File Locations 3-4 Understanding matlabserver 3-5 matlabserver.conf 3-5 Using matlabserver 3-6 Returning…

Page 50 - MATLAB Web Server Components

MATLAB Web Server Components The MATLAB Web Server consists of a set of programs that enable MATLAB programmers to create MATLAB applications and…

Page 51

: Figure 3-1: MATLAB on the Web Initial HTML Form or URL Generated HTML Form Client MATLAB Client http daemon matweb matlabserver M-files Data…

Page 52 - File Locations

File Locations Any M-files used in conjunction with a Web application, including matweb.m, must appear on the MATLAB path. The matweb and matweb.conf…

Page 53 - Understanding matlabserver

Understanding matlabserver 3-5 Understanding matlabserver is designed to run continuously in the background as a Windows NT service or as a background…

Page 54

Note that the values for the variables can contain references to other shell variables using the normal shell $ notation. Table 3-1: Additional…

Page 55 - Changing Initial Data

Understanding matlabserver 3-7 Changing Initial Data Edit matlabserver.conf on Windows NT. On Solaris/Linux run the webconf script to initialize the…

Page 56

When the MATLAB Web Server is installed, matweb is placed in <matlab>/webserver/bin/arch for all architectures. This placement allows you to run…

Page 57

Understanding matlabserver 3-9 All the fields that can be contained in matweb.conf are described in Table 3-2. After you create a new MATLAB Web…

Page 58 - Returning Results via the Web

matweb M-File Looking again at the source from the webmagic1.html file (see “webmagic Input” on page 2-5), observe that the line <input type="hidden"…

Page 59

Reference

Page 60 - 4 Reference

4 Reference 4-2 Function Summary This chapter provides detailed descriptions of the functions in the MATLAB Web Server. Function Purpose htmlrep…

Page 61 - 4htmlrep

htmlrep 4-3 4htmlrep Purpose Substitute values for variable names in HTML document Syntax outstring = htmlrep(instruct,infile) outstring =…

Page 62

htmlrep 4-4 Note The extendmemory attribute is designed only for use with htmlrep independently of the MATLAB Web Server. Using it with the MATLAB Web…

Page 63

htmlrep 4-5 <SELECT NAME="NAMELIST" SIZE=10 AUTOGENERATE=$mylist$ MULTIPLE> <OPTION SIZE=6> </SELECT> htmlrep uses the HTML code from the <SELECT> tag…

Page 64 - Syntax matweb(instruct)

matweb 4-6 4matweb Purpose MATLAB Web Server main entry point Syntax matweb(instruct) Description matweb is an M-file that in turn calls a MATLAB…

Page 65 - 4wscleanup

wscleanup 4-7 4wscleanup Purpose Purge stale files from directory Syntax deletecount = wscleanup(filespec,timewindow,direc) deletecount =…

Page 66 - Purpose Create JPEG file

wsprintjpeg 4-8 4wsprintjpeg Purpose Create JPEG file Syntax status = wsprintjpeg(fig, jpegfilename) Description status = wsprintjpeg(fig…

Page 67 - See Also getfield

wssetfield 4-9 4wssetfield Purpose Add new field or append to existing field Syntax s = wssetfield(s,name1,value1,...) Description s =…

Page 68

wssetfield

Page 69

Directory Structure

Page 70 - A Directory Structure

A Directory Structure A-2 MATLAB is distributed in compressed format on CD. The installation procedure moves the files to your hard disk, decompresses…

Page 71

You must also place a copy of the appropriate matweb executable and matweb.conf into the /cgi-bin aliased subdirectory of the HTTP server root…

Page 72

A Directory Structure A-4 Table A-4: <matlab>/toolbox/webserver/wsdemos File Purpose dummy.html Temporary HTML document in bottom frame of…

Page 73

File Purpose webpeaks1.html HTML frame webpeaks2.html peaks plot output form webstock.html Stock price simulation input form webstock1.html Stock…

Page 74

A Directory Structure

Page 75 - Troubleshooting Web

Troubleshooting Web Server General Troubleshooting B-2 Additional Troubleshooting for Windows NT B-4 Additional Troubleshooting for Solaris and Linux…

Page 76 - B Troubleshooting Web Server

B Troubleshooting Web Server B-2 This section provides three categories of troubleshooting information: General Troubleshooting Additional…

Page 77 - Connect() failure Error

Application-Specific Log File Not Produced If present, the mllog variable in matweb.conf ( see “matweb.conf” on page 3-8) creates an…

Page 78

B Troubleshooting Web Server B-4 1 matlabserver is not running. On Solaris or Linux run the webstat script. On Windows NT click the Start button, open…

Page 79

Viewer appears, click on Log on the menu bar and choose Application from the pull-down menu. Double-click on a matlabserver entry to receive…

Page 80

B Troubleshooting Web Server B-6 Startup Sequence If you install a new version of MATLAB and the MATLAB Web Server, you need to start MATLAB before…

Page 81

C Selected Bibliography

Page 82 - C Selected Bibliography

C Selected Bibliography C-2 Numerous books have been published about HTML programming and the World Wide Web. Two that we have found both useful and…

Page 83

Index A alias 1-8 aliases 1-7 applications 1-3 authoring systems 1-3 availability 1-6 B bind error B-3 browsers 1-5 C configuration files 3-2…

Page 84

Index I-4 nomenclature 2-5 single entry B-4 matweb program 3-7 matweb.conf 3-8 application development 1-3 format 1-6 locating graphic files 1-7 mldir…

Page 85

Index I-5 Solaris B-6 Windows NT B-4 twebmagic.m 2-13 typographical conventions (table) vii V virtual network computing (VNC) 1-13 VNC virtual network…

Page 86

Index

More documents for Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE

Questions about MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE

No questions about this manual yet. Ask the first one.

Ask a question

We answer from the manual and name the page. The question appears on the site after it is checked.

All questions and answers ›

Related products and manuals for Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE