On Thu, Feb 3, 2011 at 7:14 PM, Base wrote:
>
> Thank you Laurent and Ken. Both great responses.
>
> What I was forgetting was that vector is a function of the index.
>
> This now makes total sense and I feel like a dummy for not getting
> it. Thanks for your responses.
You're welcome.
--
Yo
Thank you Laurent and Ken. Both great responses.
What I was forgetting was that vector is a function of the index.
This now makes total sense and I feel like a dummy for not getting
it. Thanks for your responses.
On Feb 3, 3:44 pm, Laurent PETIT wrote:
> 2011/2/3 Base :
>
>
>
>
>
> > Thats t
That's a good one, on par with the one line low-pass filter:
;; filter noise
;;(http://clojure-log.n01se.net/date/2009-10-13.html by ambient
;;this is such a cool transform!!!
(defn lo-pass
[d coll]
(reductions #(+ (* %2 d) (* %1 (- 1.0 d))) coll))
sincerely,
--Robert McIntyre
On Thu, Feb
On Thu, Feb 3, 2011 at 4:33 PM, Base wrote:
> Thats the one!
>
> Now I just have to understand it...
>
> The first apply is throwing me a little.
Start with
(map foo [1 2 3] [4 5 6] [7 8 9])
That calls foo with the first elements of the collections (so, 1 4 7),
then again with the second (2 5 8
2011/2/3 Base :
> Thats the one!
>
> Now I just have to understand it...
>
> The first apply is throwing me a little.
>
>
> On Feb 3, 3:29 pm, Laurent PETIT wrote:
>> Hello,
>>
>> 2011/2/3 Base :
>>
>> > Hi All -
>>
>> > I recall seeing a beautiful method for doing the following on this
>> > site,
Thats the one!
Now I just have to understand it...
The first apply is throwing me a little.
On Feb 3, 3:29 pm, Laurent PETIT wrote:
> Hello,
>
> 2011/2/3 Base :
>
> > Hi All -
>
> > I recall seeing a beautiful method for doing the following on this
> > site, but cannot seem to find it
> >
Hello,
2011/2/3 Base :
> Hi All -
>
> I recall seeing a beautiful method for doing the following on this
> site, but cannot seem to find it
> I would like to transform
>
> (def a [[1 2 3]
> [4 5 6]
> [7 8 9]])
>
> to
>
> [[1 4 7]
> [2 5 8]
> [3 6 9]]
user=> (vec (apply map vecto
Hi All -
I recall seeing a beautiful method for doing the following on this
site, but cannot seem to find it
I would like to transform
(def a [[1 2 3]
[4 5 6]
[7 8 9]])
to
[[1 4 7]
[2 5 8]
[3 6 9]]
Thanks
--
You received this message because you are subscribed to the Goog
"]["L" "5.4" "4.5"]
]
I would like to create a vector that contains the max values of each
of the second and third values from this vector
in this case it would be: [5.4, 7.9]
The method to do this that i have seen would be to
1. Transpose the vector using (apply
quot;4.2" "6.6"] ["L" "4.9" "7.9"] ["L" "1.1"
> > "2.4"]["L" "5.4" "4.5"]
> > ]
>
> > I would like to create a vector that contains the max values of each
> > of the
uot;
> "2.4"]["L" "5.4" "4.5"]
> ]
>
> I would like to create a vector that contains the max values of each
> of the second and third values from this vector
>
> in this case it would be: [5.4, 7.9]
>
> The method to do this tha
I would like to create a vector that contains the max values of each
of the second and third values from this vector
in this case it would be: [5.4, 7.9]
The method to do this that i have seen would be to
1. Transpose the vector using (apply map vector v)
2. Discard the vector of Ms and
12 matches
Mail list logo