Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Process each element in my buffer ?

Asked by I Made on 11 Mar 2013

As example i have this data on my buffer

1 2 3 4 5 6 7 8 9 10

2 3 4 5 6 7 8 9 10 1

3 4 5 6 7 8 9 10 1 2

i want to calculate each column using formula, sum all and divide by 2 so i get :

2 4,5 6 7,5 9 10,5 12 13,5 10 6,5

How can i do that, the main idea i asking here is how to apply a certain formula to each column in a buffer?

0 Comments

I Made

Tags

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek on 11 Mar 2013
Edited by Azzi Abdelmalek on 11 Mar 2013
   A=[1 2 3 4 5 6 7 8 9 10
      2 3 4 5 6 7 8 9 10 1
      3 4 5 6 7 8 9 10 1 2]
   out=sum(A)/2

0 Comments

Azzi Abdelmalek

Contact us