Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2646
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | Heike Gramberg <heike.gramberg@gmail.com> |
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: get a, b from numbers in the form a+b Pi |
| Date | Mon, 23 May 2011 10:28:37 +0000 (UTC) |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Sender | steve@smc.vnet.net |
| Approved | Steven M. Christensen <steve@smc.vnet.net>, Moderator |
| Message-ID | <irdcsl$3se$1@smc.vnet.net> (permalink) |
| Lines | 31 |
| NNTP-Posting-Date | 23 May 2011 09:29:39 GMT |
| NNTP-Posting-Host | e5dcb985.news.twtelecom.net |
| X-Trace | DXC=UUOJA^I7KQc2hjn;A6STQiC_A=>8kQj6m=_1NR_H?JPm0hKU?XklfJcEFiONJ7[GofcdYga8Z12Zl |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:2646 |
Show key headers only | View raw
You could try something like
CoefficientList[nums, Pi]
Heike.
On 22 May 2011, at 11:57, 1.156 wrote:
> I have lists of numbers (Mathematica output) all numerically in the
> form a + b*Pi and I'm trying to extract the values of a and b for
> further work.
>
> Here's an example of the best I've been able to do so far:
>
> nums={1/2 (-2+\[Pi]),-2+(3 \[Pi])/4,-(11/3)+(5 \[Pi])/4,5/48 (-64+21
> \[Pi]),-(61/5)+(63 \[Pi])/16,-(338/15)+(231 \[Pi])/32};
> {FullForm[#][[1,1]],FullForm[#][[1,2]]/\[Pi]}&/@nums
>
> When I run this line of code 4 of the six input numbers give me the
> {a,b} I'm looking for but the first and fourth entries fail because the
> form isn't right. Possibly I could patch this scheme to look for a small
> finite set of possibilities of input number form but I suspect I may a
> long way from attacking this problem correctly.
>
> Can someone offer some other ideas on how to pull this off? Many thanks
> for looking at this. Rob
> --
> Sent from my plain desktop PC.
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: get a, b from numbers in the form a+b Pi Heike Gramberg <heike.gramberg@gmail.com> - 2011-05-23 10:28 +0000
csiph-web