![]() |
如何在MATLAB中找到矩阵中的特定元素?
我有一个数据集文件,其中有3列。
0 0 1 1 0 0 0 1 0 我已经将数据文件加载到MATLAB中,现在我想检查输出“ 1”在哪一列。 该文件的名称是:out.data 在第一行的第三列中显示“ 1”。如何在Matlab中编写它? [B]回答:[/B] output = [0 0 1 ; 1 0 0 ; 0 1 0]; [~,index] = max(output, [], 2) index = 3 1 2 [url=https://stackoverflow.com/questions/3454010]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 01:18。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.