matlab code for taking very less sample
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have to take a few samples from a sinusodial signal.I have generated sinusodial signal using sin. But i am unable to write the matlab code to take very less samples from that sinusodial signal.please help............
0 commentaires
Réponse acceptée
Oleg Komarov
le 20 Fév 2013
Modifié(e) : Oleg Komarov
le 20 Fév 2013
You might find the getting started guide very useful, second and third chapters are a good investment.
% Sample data
x = 1:100;
y = sin(x);
% Take every 10
y(1:10:100)
0 commentaires
Plus de réponses (2)
Azzi Abdelmalek
le 20 Fév 2013
If you have a Signal Processing toolbox, you can use downsample function
0 commentaires
Image Analyst
le 20 Fév 2013
Try this on the signal you have generated to take every 5th sample:
subSampledSignal = yourSignal(1:5:end);
Adapt as needed.
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!