필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

x is 521*1 vector.i wanna to access x values except the positions of 1:16:512.

조회 수: 1 (최근 30일)
MAMATHA YADAVALLI
MAMATHA YADAVALLI 2017년 12월 31일
마감: MATLAB Answer Bot 2021년 8월 20일
x=rand(512,1);
p=1:16:512;
disp(x(p)) % it displays 1 value,17 value like that
i want to display the remainig positions value

답변 (1개)

the cyclist
the cyclist 2017년 12월 31일
Here is one way:
x=rand(512,1);
p=1:16:512;
q=setdiff(1:512,p);
disp(x(q))

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by