help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave script in cgi-bin


From: Mike Miller
Subject: Re: octave script in cgi-bin
Date: Mon, 11 Oct 1999 00:00:15 -0500 (CDT)

On Mon, 11 Oct 1999, John Judge wrote:

> Your problem is that your script needs to produce syntactally correct
> HTML and a proper header. What usually needs to be done is that your
> script needs to produce text which looks like:
> 
> Content-type: text/html
> 
> <HTML>
> <HEAD><TITLE>title string</TITLE></HEAD>
> <BODY><PRE>
> the output from your script
> </PRE></BODY></HTML>
> 
> The blank line between the Content type and the start of the HTML is
> mandatory. You could either write these out using printf or wrap calls
> to octave in a shell script.


John--

I hope you don't mind that I'm sending this to the octave list.  Your
suggestion was very helpful.  I used 'disp' lines to put out the needed
HTML code as follows:

#!/usr/local/bin/octave -qf
disp(['Content-type: text/html'])
disp(['\n'])
disp(['<HTML>'])
disp(['<HEAD><TITLE>MV Normal Random Numbers</TITLE></HEAD>'])
disp(['<BODY><PRE>'])
format bank; disp(randn(100,6)*chol(.5*ones(6)+.5*eye(6)))
disp(['</PRE></BODY></HTML>'])


That really worked beautifully.  If anyone would like to execute this and
see the HTML, go here:

http://taxa.psyc.missouri.edu/cgi-bin/makerand3

It produces data just as makerand2 did, but it is a cleaner method.  If
anyone has more suggestions on how best to do this, please chime in.

Thanks!

Regards,

Mike

-- 
Michael B. Miller
University of Missouri--Columbia
http://taxa.psyc.missouri.edu/~mbmiller/



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]