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

MathGroup Archive 2007

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

Search the Archive

Re: Vectors,Norms and assumptions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82789] Re: Vectors,Norms and assumptions
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Wed, 31 Oct 2007 06:08:04 -0500 (EST)
  • References: <fg6rjo$e89$1@smc.vnet.net> <fg722g$jsf$1@smc.vnet.net>

Peter Breitfeld wrote:
> sapsi schrieb:
>> Hello,
>> I have a question in mathematica (actually 3).
>>
>> 1. Let v be v={av1,av2} , then Norm[v]=Sqrt[Abs[av1]^2 + Abs[av2]^2]
>> Q: How do indicate to mathematica that av1 and av2 belong to reals?
>>
>> 2. On a similar note, i have
>> n={an1,an2}
>> a={aa1,aa2}
>> (*an1,an2,aa1,aa2 are all reals*)
>> x=Norm[y(n-a)]
>>>> Sqrt[Abs[(-aa1 + an1) y]^2 + Abs[(-aa2 + an2) y]^2]
>> Once again, how do i indicate that y ,an1,an2,aa1,aa2 are reals?
>>
>> Thank you for your time and help.
>> Rgds
>> Bveo
>>
>>
> 
> You could write a function
> 
> RNorm[x_]:=Simplify[Norm[x]//.Abs[u]^2:>u^2]

Or, for as long as you (the OP) are working only with vectors, you could 
define your own rnorm function as

rnorm = Sqrt[#.#]&


-- 
Szabolcs


  • Prev by Date: Re: Setting Negatives to Zero
  • Next by Date: ANN: Fixing polygon-based plots
  • Previous by thread: Re: Vectors,Norms and assumptions
  • Next by thread: Truncated version of lognormal distribution