how to extract elements that are not succesive

1 vue (au cours des 30 derniers jours)
민주
민주 le 25 Août 2023
Commenté : Image Analyst le 30 Août 2023
how can I extract elements that are not succesive?
For example, how can I extract 1st, 3nd and 6th elements from 7x1 matrix density?
It would be really helpful if you can help me solve the problem..

Réponses (2)

Walter Roberson
Walter Roberson le 25 Août 2023
Y([1, 3, 6])
or
Y(round(5*(1:3)/2-5/3))
  1 commentaire
민주
민주 le 30 Août 2023
Thanks for answering! have a nice day :)

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 25 Août 2023
Here's help: Invest 2 hours of your time here:
You will learn things like that plus more.
  2 commentaires
민주
민주 le 30 Août 2023
The question above was actually the question that I had during studying that cource lol🤣 thanks for your recomendation anyway
Image Analyst
Image Analyst le 30 Août 2023
OK, then they must have told you how to do it in advance, though perhaps with different numbers. In my experience you're taught/told things and then tested afterwards, with situations where the facts/numbers are slightly altered, on things that you've been taught. I don't think they'd ask you something completely out of the blue that you have not yet been taught. Anyway, Walter's answer is correct and I hope you enjoy using MATLAB like the rest of us. 😁

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by