help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculating log for each array element


From: David Bateman
Subject: Re: Calculating log for each array element
Date: Fri, 20 Jun 2008 15:30:08 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

DimitryASuplatov wrote:
> Hello,
>
> I have array with some values initialized as
>
> a = load <filename>
>
> I want now to create another array b so as b[i] = log(a[i])
> I do this as follows
>
> for i = 1:length(a)
>       b(i) = log(a(i))
> endfor
>
> This works but it takes to long
>
> 1/ Is there any way to speed this up?
> 2/ How to convert my array a to list?
> 3/ How to append to array?
>
> I really appreciate your help!
> Thank you!
>
> SDA
>
>   
what's wrong with "b = log(a)"?

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]