help-octave
[Top][All Lists]
Advanced

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

Vectorization


From: Thomas D. Dean
Subject: Vectorization
Date: Tue, 07 Oct 2014 21:12:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

I have data collected from an optical encoder attached to a DC motor. The motor is driver with a PWM signal.

PWM = [0:20:240 255 240: -20:-240 -255 -240:20:0]

> size(encoder)
20571 1

I want mean(encoder(PWM==20)) for each of the PWM values.

How do I vectorize this?

Tom Dean



reply via email to

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