필터 지우기
필터 지우기

Fill in a Matrix with predefined numbers

조회 수: 1 (최근 30일)
Konstantinos
Konstantinos 2015년 1월 10일
답변: Guillaume 2015년 1월 10일
I want to create a row matrix of 16 elements and fill in the first 8 elements (as well as the last 8 elements) of it, with integers from 1 to 8, each being used only once.
i.e. result = ( 2 5 6 8 3 1 4 7 3 5 1 7 8 4 2 6 )
Any help could be useful. thanks in advance!

채택된 답변

Guillaume
Guillaume 2015년 1월 10일
[randperm(8) randperm(8)]

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by