help-octave
[Top][All Lists]
Advanced

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

[newbie] how to make a function perform differently depending on output


From: Jean Dubois
Subject: [newbie] how to make a function perform differently depending on output asked for
Date: Mon, 8 Dec 2014 19:31:30 +0100

I'm a writing a bode-function myself as I want it to perform a bit
differently from
the bode-function in the octave-control package. I could make it plot
the phase and magnitude diagrams as I wish now, but I'd also like it to mimic
a behaviour which the bode-function in the octave-control package has:
when you enter this:
 bode(tf([3 1],[1 3 1]))
you get the two expected plots on you screen
however you can also do this:
 [mag,pha,w]=bode(tf([3 1],[1 3 1]))

in this case you don't get the plots on the screen but the results are put in
the arrays mag, pha an w

How can I make my own function do the same? The function should detect
somehow whether numerical output is desired or not.

any help very much appreciated
jean



reply via email to

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