Encode a digitized signal using a specific relation
2 views (last 30 days)
Show older comments
Good morning. I've got a digitized signal x in a .txt file and I have to encode it. The encoded signal g(x) is obtained by a specific mathematical relation, but I've no idea on how to apply this relation on such .txt file that contains all the information. This encoding should allow me to reduce data from samples of 16 bits to 8 bits in length. Does someone know if it exists a function which can help me in completing this task?
Thank you in advance
0 Comments
Answers (1)
Akhilesh Mishra
on 8 Sep 2017
Hello Paolo,
I think the easiest way to implement this encoding would be by first reading the contents of the .txt in the MATLAB workspace. Please try using the function 'fscanf' to read the contents of a text file into an array. Please refer to the link of this function and also go through the first example mentioned in this page - https://www.mathworks.com/help/matlab/ref/fscanf.html
Once you have the data as an array, you can apply the encoding or other operations on this data.
I hope this helps!
Thanks, Akhilesh
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!