[Top][All Lists]

[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>
> 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.


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(['<HEAD><TITLE>MV Normal Random Numbers</TITLE></HEAD>'])
format bank; disp(randn(100,6)*chol(.5*ones(6)+.5*eye(6)))

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

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.




Michael B. Miller
University of Missouri--Columbia

Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

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