Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: problem in expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99922] Re: problem in expression
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Tue, 19 May 2009 06:46:35 -0400 (EDT)
  • References: <gurckc$gri$1@smc.vnet.net>

Obaid Ur Rehman wrote:
> I am wondering if some one can help me in the following problem.
> 
> 
> 
> Whenever I solve or do some manipulation with certain matrix or vector,
> it gives me result in the following form e.g.
> 
> 
> 
> F=0.x1+0.x2+1.x3+0.x4
> 
> 
> 
> It is clear that F=x3 but why the expression contains multiples of
> zeros. If certain vector is multiplied by zero the result should be zero
> and it must not be appear in the final expression.
> 
> 
> 
> Could you people please help me out to get rid of these zeros in the
> final expression?

Using inexact numbers in symbolic computations invites trouble.  Do not 
do that.  If you need to start with inexact numbers, rationalize them 
before using them in symbolic expressions (Rationalize[]).  0.0 is not 
the same as 0 in Mathematica.  0 is an exact zero while 0.0 is zero only 
to a certain precision.


  • Prev by Date: Filenames with ToString
  • Next by Date: ColorFunction Range (Mathematica v7)
  • Previous by thread: Re: problem in expression
  • Next by thread: Re: problem in expression