[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatically generating usage and help strings for a function?
From: |
Søren Hauberg |
Subject: |
Re: Automatically generating usage and help strings for a function? |
Date: |
Tue, 15 Jun 2010 16:02:05 +0200 |
man, 14 06 2010 kl. 22:08 +0000, skrev forkandwait:
> Is there a way to programmatically get
> the usage and help strings inside a function?
>
> For example, I have the following code:
>
> function [Lx tm bx]= varyLx(Lx, s, bx)
> %% [Lx tm bx] = varyLx(Lx, s, bx)
> %%
> %% returns Lx blah blah blah description
>
> if nargin < 1
> usage ("gmafc", "[Lx tm bx] = varyLx(Lx, s, bx)\n")
> endif
>
> I type "[Lx tm bx] = varyLx(Lx, s, bx)" three times,
Can't you just use 'print_usage' ?
Otherwise you can get the help text with the 'get_help_text' function.
Søren