CAS.numer; denom; lcoeff; degree... ??!! [It's OK NOW ! :o)]

02142015, 07:35 PM
(This post was last modified: 02162015 08:46 PM by dg1969.)
Post: #1




CAS.numer; denom; lcoeff; degree... ??!! [It's OK NOW ! :o)]
I can't find a way to use lcoeff; degree; coeff in a home program...
Code:
In my mind string inside CAS.cas_stuff("...") is the good practice ? these code doesn't work... Code:


02142015, 08:34 PM
(This post was last modified: 02152015 01:53 PM by dg1969.)
Post: #2




RE: CAS.numer; denom; lcoeff; degree... ??!!
I need these functions in a home program because i'd like to compute symbolicaly the phase \(\varphi\) of a transfer functions \(\dfrac{P(s)}{Q(s)}\cdot e^{k\cdot s}\) initially placed in F0 to F9 var in term of 'X' in a FUNCTION APP like
"froot" from CAS give me all roots of numerator and denom with multiplicity so : \(F(s)=K\cdot\dfrac{(sr1)...(sr_n)}{(sp_1)...(sp_m)}\cdot e^{k\cdot s}\) with \(n \leq m\) \(\varphi=arg(F(i\cdot \omega) \) lcoeff(numer)/lcoeff(denom) give me \(K\) so first term of \(\varphi\) is known I can easily compute the major terms of the sum of \( \varphi\) : \(+/m_i\cdot atan \dfrac{\beta_i\omega}{\alpha_i}\) where \(\omega \) is the pulsation ; \(\alpha_i; \beta_i ;m_i \) are resp the real part the imaginary part and multiplicity of roots and poles of \(F(s)\) I need to test if an exp term is there to add the last term in the phase sum... Don't know how to parse yet... At the end I want to place these phase functions in F_i var's in term of 'X' for plot... I try these way to plot bode phase without +/ pi discontinuity... At the end I want to keep benefits of the function app plot facility (max, zero etc...) 

02162015, 07:53 PM
Post: #3




RE: CAS.numer; denom; lcoeff; degree... ??!!
(02142015 07:35 PM)dg1969 Wrote: I can't find a way to use lcoeff; degree; coeff in a home program... Tried with the emulator, and everything works properly here for me. As for CAS.coeff("x^2+2,2") =>0 are you sure you didn't mean CAS.coeff("x^2+2","2") Notice the quotes around each argument (the second set of quotes is unnecessary since the 2 is not symbolic) Graph 3D  QPI  SolveSys 

02162015, 08:45 PM
Post: #4




RE: CAS.numer; denom; lcoeff; degree... ??!! [IT'S OK NOW !]
Han. You are absolutely irreplaceable ! Thank you for your endless patience.
I just found something you already knew. Integrated help does not give the exact syntax for the HOME side which is in fact different from the CAS side. In CAS side: Code:
but it is essential in the "home" side. The aid does not indicate expect for : Code:
so Code:
Code:
It's the same thing for other commands that I mentioned... Han, you know what ? You are my best cyberfriend :o) 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)