List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: invztrans question
| [MUG] Re: invztrans question |
|
Author: Maple Group
Posted: 31/03/2000 15:09:34 GDT
|
>> From: Maple Group
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 29 Mar 2000 12:49:20 -0500
From: Ray Vickson
To:
Subject: invztrans question
Sorry for the stupid question below. Using 'evalc" does just what I want.
RGV
| When inverting some z-transforms, Maple V.1 gives me terms of the form
| (a+I*b)^n, (with floats a and b), but it is important to me to have them
| in the form r^n * cos(n*w) and r^n * sin(n*w) instead (especially since
| the result should be real, but has a very small imaginary part due to
| 'evalf's'). How can I coerce Maple to give me my preferred form? I've
| tried simplify(*,'trig'), but it doesn't do what I want, even with n
| declared integer.
|
| RGV
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 29 Mar 2000 20:46:51 +0100
From: Paulo Avilez Valente
To:
Subject: invztrans question
Just use evalc(argument)
Paulo Avilez-Valente
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 29 Mar 2000 13:45:29 -0800 (PST)
From: Robert Israel
To:
Subject: invztrans question
I hope you mean Maple V Release 5.1, not Release 1. I think the following
procedure should do what you want.
> polarpow:= proc(x)
local a, b, m, r, w, S;
if
patmatch(x, ((a::realcons) + I*(b::realcons))^(m::algebraic), S)
then
r := subs(S, sqrt(a^2 + b^2));
w := evalf(subs(S, arctan(b/r, a/r)));
m := subs(S,m);
r^m*(cos(m*w) + I*sin(m*w))
elif type(x, {`^`, `*`, `+`}) then map(polarpow, x)
else x
fi
end;
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 30 Mar 2000 11:38:55 +0200
From: Barsuhn
Subject: invztrans question
To:
Dear Ray,
use evalc, as is shown in the example:
z:=2.3+I*7.8;z^n;evalc(%);
All the best Jurgen
--
-------------------
Prof. Dr. Jurgen Barsuhn
Fachhochschule Bielefeld
University of Applied Sciences
Fachbereich Elektrotechnik und Informationstechnik
D-33511 Bielefeld
-----------
|
[View Complete Thread]
Previous by date: [MUG] Re: Maple r4 ->Maple r5 ->Maple r4 problems, Maple Group
Next by date: [MUG] Re: Error Function, Maple Group
Previous thread: [MUG] Variables in an array, Jonathan Dentch
Next thread: [MUG] Error Function, Becker, Thomas
|