poster
2019-12-10, 20:48
我有一个数据集文件,其中有3列。
0 0 1 1 0 0 0 1 0 我已经将数据文件加载到MATLAB中,现在我想检查输出“ 1”在哪一列。
该文件的名称是:out.data
在第一行的第三列中显示“ 1”。如何在Matlab中编写它?
回答:
output = [0 0 1 ; 1 0 0 ; 0 1 0]; [~,index] = max(output, [], 2) index = 3 1 2
更多&回答... (https://stackoverflow.com/questions/3454010)
0 0 1 1 0 0 0 1 0 我已经将数据文件加载到MATLAB中,现在我想检查输出“ 1”在哪一列。
该文件的名称是:out.data
在第一行的第三列中显示“ 1”。如何在Matlab中编写它?
回答:
output = [0 0 1 ; 1 0 0 ; 0 1 0]; [~,index] = max(output, [], 2) index = 3 1 2
更多&回答... (https://stackoverflow.com/questions/3454010)