help-octave
[Top][All Lists]
Advanced

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

Re: A problem with ilaplace()


From: Doug Stewart
Subject: Re: A problem with ilaplace()
Date: Tue, 14 Nov 2017 12:16:12 -0500



On Tue, Nov 14, 2017 at 9:47 AM, Leo Baumann <address@hidden> wrote:
Hello folks,

I have reduced the problem. -

It is explained in Octave script:

#--------------------------------------------------------------------------

clc;
clear all;
pkg load symbolic;
syms p t;

#a few simple calculations
Rgen=50;C1=100e-9;Rlast=50;
fg=10e3;
R1=1/(2*pi*10e3*C1)-Rgen;
wg=2*pi*fg;

#this works fine, Tp1 is a simple imagined example ...
Tp1=1/(5*p+6);
laplace1=1/p*Tp1;
ux=function_handle(ilaplace(laplace1, p, t));

#this doesn't work, I don't understand that because Tp2 is the same
#as the example with other numbers
Tp2=1/(1+(Rgen+R1)/Rlast+p*C1*(Rgen+R1));
laplace2=1/p*Tp2;
ux=function_handle(ilaplace(laplace2, p, t));

#----------------------------------------------------------------------------------------

I don't understand that the second example doesn't work, all variables are defined.

Any hint?

Thanks - Leo


Hi Leo:

Yes I can reproduce your problem. It does seem strange that the symbolics pkg can give
a nice answer to the simple example and not give an answer to the real example.

If you really want a symbolic answer then Xmaxima is one way to do it;

here is maxima's answer:
(%i14)  Tp2:1/(1+(Rgen+R1)/Rlast+p*C1*(Rgen+R1));
                                                                                        1
(%o14)                                                                   --------------------------------
                                                                                            Rgen + R1
                                                                         p C1 (Rgen + R1) + --------- + 1
                                                                                              Rlast
(%i15) ll:laplace2:1/p*Tp2;
                                                                                        1
(%o15)                                                                 ------------------------------------
                                                                                             Rgen + R1
                                                                       p (p C1 (Rgen + R1) + --------- + 1)
                                                                                               Rlast
(%i16) ilt(ll,p,t);
                                                                                                          t (Rgen + Rlast + R1)
                                                                                                     - ---------------------------
                                                                              2           2            Rlast C1 R1 + Rgen Rlast C1
                                                     Rlast         (Rgen Rlast  C1 + Rlast  C1 R1) %e
(%o16)                                         ----------------- - ---------------------------------------------------------------
                                               R1 + Rlast + Rgen          (R1 + Rlast + Rgen) (Rlast C1 R1 + Rgen Rlast C1)



some of the formatting gets warped but you can try the commands yourself in Xmaxima.

Doug


--
DAS


reply via email to

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