0
votes

how to import a bitsream form binary vector from workspace into simulink.Actually I have found that I can use simin block or In block but my binary vector is independant of time. I tried to use Const block and it works but afer that when I wanted to put my output in the Buffer block in simulink, it didn't work because the input is continuous and not discrete. So I am asking if it's a way to add time to my binary uni-dimensional without having any influence on the result?and how can I do it? Or is there another way to import this date to avoid this problem with Buffer block?

enter image description here

1
Why not change the sample time of the constant block to discrete?am304
if I understand you, it doesn't work and it displays this error: Error reported by S-Function 'sdsprebuff2' in 'test/Buffer': All sample times for this block must be discrete.No continuous or constant sample times are allowed. In fact, The input imported by the Constant block is a vector of [8187368 1] and the buffer create a vector of : [64 818736] with the error mentioned above.Hoffen
You need to show us the model, or a screenshot of it with the corresponding block (and model) parameters. Which sample time solver are you using for your model? Which sample time are you using for you buffer block and constant block? Are there any other blocks involved the model?am304
I cannot upload a screenshot from my computer, I have to earn 10 reputation :(Hoffen
But, I explain to you more specifically: I have already extract the encoded file test.264 with jsvm software,and then I have opened it by Matlab and converted it into bitstream.Then I wanted to transmit this bitsream through Wimax chain. So, as first step, I imported this bitsream into simulink through Const block but when I put its output in turbo encoder the dimension was too big, that's why I need to introduce a buffer .For the parameter Const block : bitstream as Constant value and sampling mode as sample frame and for the Buffer block: in default case.Hoffen

1 Answers

1
votes

Your screenshot shows your constant block to have a sample time of Inf. As the error message suggest, you need to change that to a discrete sample time. In addition, you should also:

  • check your model is using a fixed-step solver
  • check what time step you are using for your chosen fixed-step solver (ideally the same as your constant).

You can have multi-rate models, but you need to manage the rate transitions with Rate Transition blocks. For more details on sample times, see the documentation, in particular how to view sample time information in a Simulink model. You should probably also have a quick look at the Choose a Solver section.