Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有这些数据
my_data = [ 10 20 30 40; 0.1 0.7 0.4 0.3; 6 1 2 3; 2 5 4 2]; my_index = logical(my_data(4,:)==2);
使用“my_index”提供此输出的最简单方法是什么
10.0000 40.0000 0.1000 0.3000 6.0000 3.0000 2.0000 2.0000
my_data(:,my_index)
但我怀疑这太简单了,以至于不能满足您的(背景)要求...