フィルターのクリア

Using 'From Multimedia File', how to split the channels

11 ビュー (過去 30 日間)
Jesse
Jesse 2011 年 10 月 23 日
コメント済み: Hamda Zarrouk 2023 年 2 月 9 日
When using the 'From Multimedia File' and a stereo audio file in simulink, how can you take the output of the block and split into two matrices. (eg. output is 256x2 and is split into two matrices of 256x1). My last resort would be to load the file first into a workspace and then get the matrix from there, but I would like to avoid that
What I have tried and didnt work: Demux Direct lookup table Matrix Multiply
Any way to do this?
thanks J

採用された回答

Jesse
Jesse 2011 年 10 月 25 日
For anyone who comes across this post:
you can use a 'Multiport selector' block to select columns of a matrix. Different columns can be used as outputs of the block. Thus it is quite easy to use with 'From Multimedia File' block and split the audio channels.
  1 件のコメント
Hamda Zarrouk
Hamda Zarrouk 2023 年 2 月 9 日
Hello, I have a similar problem, where I need to seperate a stereo signal into two monos each with a size of 1024. Thank for for your explanaition, it saved me precious time rearching fro the right answer. It can also basically be considered a matrix 1024*2. Now the problem that have is dispaying the seperate sinals in each scope. I get this warning and even after waiting a lot the signal is not right. what sould i do and what settings have to be set right ? Thanks you.

サインインしてコメントする。

その他の回答 (2 件)

bym
bym 2011 年 10 月 23 日
How about a plain old demux?
  1 件のコメント
Jesse
Jesse 2011 年 10 月 24 日
tried that, it simply gave an error that to demux the signal had to be first muxed

サインインしてコメントする。


Doug Eastman
Doug Eastman 2011 年 10 月 24 日
Demux only works with vectors, but this signal is a matrix. You can use two Selector blocks. Set the input dimensions to 2, select all from the first index and 1 from the second index for the first block, 2 for the second block.
  1 件のコメント
Jesse
Jesse 2011 年 10 月 25 日
Hi Doug,
thanks for the reply. When I was searching for the selector block I came across a multiport selector block. This allows me to split an input matrix into rows or columns. Works well.
thanks
J

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSignal Import and Export についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by