フィルターのクリア

How can I get the cell array's max vaule in each cell?

1 回表示 (過去 30 日間)
zb li
zb li 2018 年 12 月 8 日
回答済み: Jan 2018 年 12 月 9 日
Hi everyone,
I have get a cell (1,12) by this code ,each cell have different rows (5000~13000 rows) and 3 column. data.m is my data.
clear all;clc;
folder = 'C:\Users\Dr.Li\\NB1';
cd(folder)
f = fullfile(folder,'*.cxp');
d = dir(f);
for k = 1:numel(d);
data{k} = importfile(fullfile(folder,d(k).name));
putdata{k} = [data{1,k}(214:end,1:3)];
end
CH = {'parameter1','parameter1','parameter1'};
for k = 1:numel(d);
data{k} = importfile(fullfile(folder,d(k).name));
putdata{k} = [CH;data{1,k}(214:end,1:3)];
end
I want get the max value in each cell's first column.,and export the value's row number .
How can I to do?
Thank you
LI
  1 件のコメント
zb li
zb li 2018 年 12 月 8 日
編集済み: zb li 2018 年 12 月 9 日
@ MATLAB @Azzi Abdelmalek @ Jan
非常感谢你

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2018 年 12 月 9 日
I assume:
maxValue = nan(1, numel(d));
maxIndex = nan(1, numel(d));
for k = 1:numel(d)
[maxValue(k), maxIndex(k)] = max(putdata{k}(:, 1));
end

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by