필터 지우기
필터 지우기

how to output last sample of every 16 samples

조회 수: 5 (최근 30일)
byb
byb 2018년 9월 10일
댓글: Walter Roberson 2018년 9월 18일
I have to store 16 samples of ADC output and then use only last sample of every 16 sample to be the display on scope, How I do it in Simulink only please???
I have used buffer to create store the 16 samples and the took average to display only one signal in scope but that is not as accurate as it would be to get last signal for every 16 signal to be displayed.
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 9월 15일
Please do not close questions that have an answer

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 15일
You can potentially convert your samples into frames and then index into the frames https://www.mathworks.com/help/dsp/ug/sample-and-frame-based-concepts.html or you can downsample the frame. Or you can just downsample or here

추가 답변 (1개)

JohnGalt
JohnGalt 2018년 9월 10일
Not sure if I understand the question correctly but if you have an array
myArray = 1:81;
you can get every 16th value using:
myArray(16:16:end) % gives answer: = 16 32 48 64 80
the notation is (startingIndex:stepSize:lastIndex)
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 9월 18일
Normally Yes, but this turns out to be a Simulink question.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Signal Import and Export에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by