|
[Date Index]
[Thread Index]
[Author Index]
Re: Coefficients of previous result
- To: mathgroup at smc.vnet.net
- Subject: [mg53124] Re: [mg53096] Coefficients of previous result
- From: DrBob <drbob at bigfoot.com>
- Date: Fri, 24 Dec 2004 05:59:12 -0500 (EST)
- References: <200412231258.HAA21139@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
expr = (1. + 2.*x + 2.*x^2 + 2.*x^3)/(1. + 2.*x + 2.*x^2);
Rationalize[expr]
(1 + 2*x + 2*x^2 + 2*x^3)/(1 + 2*x + 2*x^2)
or
expr /. a_Real -> Round[a]
(1 + 2*x + 2*x^2 + 2*x^3)/ (1 + 2*x + 2*x^2)
It's much easier, by the way, if you post expressions in InputForm. You can (temporarily) convert a cell to InputForm using Ctrl-Shift-I or menu command Cell>Convert, then copy and paste it into e-mail. Ctrl-Shift-N or Ctrl-Shift-T will convert the cell back to standard or traditional form.
Bobby
On Thu, 23 Dec 2004 07:58:51 -0500 (EST), Milind Gupta <milind.gupta at gmail.com> wrote:
> The result of my previous step is something like this:
>
> expr = 1. + 2. x + 2. x^2 + 2. x^3
> -----------------------------------------
> 1. + 2. x + 2. x^2
>
> But I need it to be like this:
>
>
> expr = 1 + 2 x + 2 x^2 + 2 x^3
> -----------------------------------------
> 1 + 2 x + 2 x^2
>
> so that I can use it with another function properly. Is there any way
> to do that?
>
> Milind
>
>
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net
Prev by Date:
Re: Coefficients of previous result
Next by Date:
Re: Re: Differentiate of Abs[x] ???
Previous by thread:
Re: Coefficients of previous result
Next by thread:
Re: Coefficients of previous result
|