matlab读取ex​cel某列数值后,取​得最大值和该值的行号​,如何读取该数值上下​各10个数值。

3 ビュー (過去 30 日間)
prvrcfeg
prvrcfeg 2023 年 5 月 25 日
回答済み: ymyveny 2023 年 5 月 25 日
各位大神,
我欲读取excel文件中某类数值,读取后,找到该列数据的最大值和所在位置,我想把最大值上方取10个数值,下方取20个数值,不知道该如何提取,我之前尝试过使用直接用所取得的位置+20计算,可是数据提示无效,请大神指点

採用された回答

ymyveny
ymyveny 2023 年 5 月 25 日
示例:
I = rand(100,1);
[Imax,Iind] = max(I);
Temp = I(Iind-10:Iind+20,1);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!