[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed Example - Please Check
From: |
Lukas Reichlin |
Subject: |
Re: Proposed Example - Please Check |
Date: |
Tue, 16 Jun 2015 09:17:42 +0200 |
On 16.06.2015, at 07:57, Thomas D. Dean <address@hidden> wrote:
> I have attached a first draft of an example using the control package.
>
> Please try it.
>
> Suggestions are welcome.
>
> Tom Dean
First of all, thanks for your work!
I suggest you show all the input for the command line before you execute it.
You can declare a string first, then use "disp" and "eval" to avoid typing
things twice.
octave:6> str = "s = tf ('s')";
octave:7> disp (str)
s = tf ('s')
octave:8> eval (str)
Transfer function 's' from input 'u1' to output ...
y1: s
Continuous-time model.
octave:9>
Even better would be to declare a function like "show"
function show (str)
disp (str);
evalin ("caller", str);
endfunction
then you can use the expression
show ("s = tf ('s')")
in your script.
octave:14> show ("s = tf ('s')")
s = tf ('s')
Transfer function 's' from input 'u1' to output ...
y1: s
Continuous-time model.
octave:15>
Best regards,
Lukas