comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » TOTAL function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
TOTAL function [message #86528] Fri, 15 November 2013 08:54 Go to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
Hi

I want to calculate the error using the TOTAL function but I got very strange results:

The error is given by
error=||Aexact-Anoisy|| with matrix A=array[1,200]

where the ||.|| represents a norm.

I typed my code like this
SQRT( Total (AExact - Anoisy) ^2. )

Each time I run this I got very different and illogical number. The maximum value of an error isn't 1?

Many Thanks
Re: TOTAL function [message #86530 is a reply to message #86528] Fri, 15 November 2013 09:22 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den fredagen den 15:e november 2013 kl. 17:54:44 UTC+1 skrev fd_...@mail.com:
> Hi
>
> I want to calculate the error using the TOTAL function but I got very strange results:
>
> The error is given by
> error=||Aexact-Anoisy|| with matrix A=array[1,200]
>
> where the ||.|| represents a norm.
>
> I typed my code like this
> SQRT( Total (AExact - Anoisy) ^2. )

You probably want to write this as SQRT( Total( (AExact - Anoisy)^2. ) ) so that you do the squaring before the summing.


> Each time I run this I got very different and illogical number. The maximum value of an error isn't 1?

That's difficult to answer without knowing anything about the contents of the two arrays.
Re: TOTAL function [message #86552 is a reply to message #86530] Tue, 19 November 2013 01:59 Go to previous message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
> You probably want to write this as SQRT( Total( (AExact - Anoisy)^2. ) ) so that you do the squaring before the summing.

Yes, this is what I want thanks a lot.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: mgunit 1.4.0 released
Next Topic: Re: IDL refuse to acknowledge anything but integers...

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:32:09 PDT 2025

Total time taken to generate the page: 0.00496 seconds