could anyone help me to find the average of A if A=[1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16;]
B=[10 20 30 40]
i want to add and divide first column by 10, second column by 20,third column by 30 and fourth column by 40.

 채택된 답변

Stephen23
Stephen23 2017년 12월 6일
편집: Stephen23 2017년 12월 6일

0 개 추천

bsxfun(@rdivide,sum(A,1),B)
ans =
2.8 1.6 1.2 1

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

태그

질문:

2017년 12월 6일

편집:

2017년 12월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by