How to form each data into integrated singnal stream?

From audio device puts out data by frame. Now my problem is how can I form each data into integrated singnal stream?
How to form each data into integrated singnal stream?

1 Comment

What do you mean by an "integrated signal stream" ?
Is this perhaps a Simulink question?

Sign in to comment.

 Accepted Answer

My friend, many thanks for your valuable reply.
Integrated signal stream means that each frame signal is saved in a variable and the variable will be processed.
If the frame signal is not saved in a variable, I will write each frame signal(10 s) into .mat file by To File and the data matrix size is 256x313. However, when the data is read from mat file by From file, only part of data can be read and the matrix size is 51x256. (The signal sampling is different). My problem is how can I read all the data, not part of data of the mat file?
I am looking forward to your answers and your suggestions. Thanks.
Alamo

3 Comments

Please if you want to comment on an answer, use the "Comment on this answer" rather than creating a new answer. It's confusing to say the least.
So you're using the "To File" block to save the data to file. You say you are using the "from File" block to read the data from the file. Presumably this is in a different model? What solvers and sample times are you using in each model? What sample time have you specified in the From File block? If you reading with a different sample time than the one you're writing with, then it's not surprise that that matrix is of a different size. Simulink will interpolate for the sample it's using in the "reading", which are probably different from the ones in the "writing" model. Have both models the same stop time?
If you want the data to be of the same size, you need to make sure everything matches between the two models.
HTH,
Arnaud
Many thanks. Your answers and your suggestions helped me solve my problems.
It's probably best if you don't accept your own answer.

Sign in to comment.

More Answers (1)

It sounds like you are referring to the From Audio Device block from the Signal Processing Blockset. Yes, it outputs a frame-based signal. There are a number of advantages in using frame-based signals, particularly for signal processing applications. You might want to have a read of Working With Signals in the Signal Processing Blockset documentation. If that doesn't answer your question, you should probably clarify what you mean by an "integrated singnal stream".
HTH,
Arnaud

Asked:

on 6 Apr 2011

Community Treasure Hunt

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

Start Hunting!