How to calculate the max and min values of 3 specific columns on an excel file?
17 ビュー (過去 30 日間)
古いコメントを表示
I have an excel file with a table 1442x31, and I want to calculate max, and min only from 3 columns (5,14,23).
Column 5 is Total population
Column 14 is Men population
Column 23 is Women population
And I want to find min and max of each of these columns.
0 件のコメント
回答 (1 件)
Ameer Hamza
2020 年 5 月 13 日
Something like this
data = xlsread('filename'); % load data from excel file
cols = data(:, [5 14 23]); % extract the required columns
min_val = min(cols);
max_val = max(cols); % these commands will ouyput minimum and maximum of each column.
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!