フィルターのクリア

Adding and subtracting values inside tables

3 ビュー (過去 30 日間)
desert_scientist90
desert_scientist90 2019 年 10 月 25 日
編集済み: adeq123 2019 年 10 月 25 日
Hi all,
I have to tables one with the high values in x= amount of years , the other table with the low values for x= amount of years. I want to be able to calculate the mean of each and divide them by 2.

採用された回答

adeq123
adeq123 2019 年 10 月 25 日
編集済み: adeq123 2019 年 10 月 25 日
Hi,
You can just use mean(). Like that:
clc;
clear all;
A = [2.189091 2.071748 1.663721 1.579909 1.542135 1.118777];
B = [-1.60278 -1.41313 -1.32337 -1.29252 -1.16406 -1.1271 -1.12233];
%Calcluate mean of each table
meanA = mean(A);
meanB = mean(B);
%Divide them by 2
meanA/2
meanB/2

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by