Communications Toolbox Query - How to read .txt file with Binary Data?
Show older comments
Hi All [Desperate need of help],
I'm totally new to Matlab Simulink and would like to pose a query for the following scenario:
Scenario: At the moment, I've constructed a Simulink system which basically has the following blocks:
Input Raw Data [Random Integer Generator] -> Modulate [QPSK Basdeband modulator] -> Filtering [Raised Cosine Filter] -> Fading signal [Multipath Rayleigh Fading Channel] -> Vector Analyzer [Agilent specific Vector Signal Analyzer block]
With the above, my simulation runs smoothly and I can analyze signal integrity for the raw data generated from the Random Integer Generator block. No problems here.
Question: I now have a .txt file which basically contains a bunch of binary data (i.e. 010010100100001101.....). I would like to replace the Random Integer Generator block portion with the data from this .txt file. What type of block do I use to load this .txt file of binary data, into my system setup?
Any assistance would be greatly appreciated.Cheers!
Regards, Nathan
Answers (1)
Wayne King
on 4 Apr 2012
0 votes
Hi Nathan, You can easily read that data into the MATLAB workspace and then use the Signal form Workspace block. The Signal from Workspace block is in the DSP System Toolbox in the Sources category.
You can also just save that signal as a .mat file and use the From File block. This block is in Simulink in the Sources category.
Categories
Find more on Signal Attributes and Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!