Frame/sample rate matching in Simulink

조회 수: 4 (최근 30일)
Jim Clay
Jim Clay 2012년 11월 15일
편집: Namrata Biranje 2019년 9월 19일
My Simulink model has a Matlab function that outputs one 1x13 vector and another 1x1300 vector. I want to interpolate the 1x13 vector by a factor of 100, and then add the two vectors together. The interpolation filters (I'm using the "Fir Interpolation" block from the DSP toolbox) don't change the size, though. I assume that they change the sample rate instead.
So I tried to serialize the data with an "Unbuffer" block. The Unbuffer block did not change the signal dimensions. I thought that maybe the vector needed to be 13x1 instead for the Unbuffer block to work, so I put in a Transpose block before it. That caused the following error:
Error in 'GenNbfm_Sim/Unbuffer': All sample times must be discrete. No continuous or constant sample times are allowed.
I tried double-clicking on the Transpose block to inspect/modify its sample rate, but as far as I can tell it doesn't allow you to do anything with its sample rate.
Thanks for taking the time to read this, and I appreciate any help that you can offer.

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 11월 15일
It looks like your input to the Unbuffer block has either constant or continuous sample time. You need to force it to be discrete. Turn on Sample Time Colors to see what sample time each of your blocks/signals has.
  댓글 수: 1
Namrata Biranje
Namrata Biranje 2019년 9월 19일
편집: Namrata Biranje 2019년 9월 19일
Change the sample time of Input block of Descrete block to Descrete sample time (e.g. try 0.01) or use Rate transiition block before descrete block and change the sample time of Rate transition block other than continous and constant i.e. other than "-1 /inf" (e.g. try 0.01)

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by