필터 지우기
필터 지우기

How to calculate the max and min values of 3 specific columns on an excel file?

조회 수: 16 (최근 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.

답변 (1개)

Ameer Hamza
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.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by