Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
MAMATHA YADAVALLI
MAMATHA YADAVALLI le 31 Déc 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (1)

the cyclist
the cyclist le 31 Déc 2017
Here is one way:
x=rand(512,1);
p=1:16:512;
q=setdiff(1:512,p);
disp(x(q))

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by