Subtracting mean from table column and creating new Column with solution
1 回表示 (過去 30 日間)
古いコメントを表示
Hey guys,
I'm new to matlab and stuck:
I have 30x10 table and I'm trying to do the following:
I'm attempting to take the values from column 5 and subract them from the mean of column 10.
I've already calculated the mean but I'm struggling to figure out how i can calculate the value of each individual row and subract it from the mean and add it a new column row in one function.
Would that be possible?
Thanks guys
0 件のコメント
回答 (2 件)
M.Many
2020 年 11 月 28 日
%M = rand(30,10);
%T = array2table(M)
T{:,11}= mean(T{:,10})-T{:,5} % Replace T by your Table
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!