Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scilab Help Files

2 views
Skip to first unread message

CMeza

unread,
Nov 12, 2009, 4:56:57 AM11/12/09
to
I have created several functions that I use regurlarly. I would like
to add some info about these functions in the Scilab Help so that when
I type "help myfunction" I've got all the info regarding my function.
Does anyone how can I do that?
I am using Scicoslab 4.3 (Scilab 4.x).

bruno

unread,
Nov 12, 2009, 9:48:36 AM11/12/09
to

In fact any comments between the header and the first line
of the function will appear. So it is a rudimentary feature but
the most simple. For instance if you define the following function :

function y = toto(x,a,b,c)
// eval the sd order polynomial p(x) = a x^2 + b x + c
// PARAMETERS
// x : scalar or vector or matrix of numbers
// a, b, c : scalars
// y : matrix of same size than x
// with y(i) = a x(i)^2 + b x(i) + c
// EXAMPLE
// y = p( [-1, 0.5, 3], 1, 3, 5)
y = a*x.^2 + b*x + c
endfunction

then (after scilab have discovered the function definition
with exec or any other means) enter help toto. There
are a number of lines which are not really interesting but
after the comments appears. The first comment line is
important as it appears also at the beginning of the help
page. Not that if you modify the comments and reload
the function you will see the first version (you have to
quit scicoslab). This "feature" seems broken or removed
in scilab-5.x. Note that it should be possible to have a better
presentation by modifying the function SCI/macros/util/
gethelpfile.sci

Otherwise you have to deal with xml (there is some functions which
can help as help_skeleton).

hth
Bruno

CMeza

unread,
Nov 16, 2009, 10:04:10 AM11/16/09
to

Thank you Bruno.

It was the simple and fast solution I was looking for.

Cheers,

CMeza

0 new messages