Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Process each element in my buffer ?

조회 수: 1 (최근 30일)
I Made
I Made 2013년 3월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 11일
편집: Azzi Abdelmalek 2013년 3월 11일
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

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by