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.
n1D配列の最小要素を取得するにはどうすればよいですか
n
例
A = [29, 60, 96, 43, 69, 53]; n=3; %so B will be like this B = [29 43 53];
これを試して:
B = sort(A); %# sort in ascending order B = B(1:n); %# take the first N-values