Loading a file into MATLAB as it is? [closed]
I'm working on a telecommunications device simulator on MATLAB. I'm going to encode some digital data, modulate it, add some noise and attempt to demodulate it, see at what noise levels my data cannot be recovered anymore.
My problem is, I don't know how to import some crazy file to my workspace. It's not going to be txt or anything, just some file. How can I make MATLAB read the file in binary format or whatever it is called?
Try questions regarding to work with binary data in matlab
Working on Binary Data in Matlab
Read and write from/to a binary file in Matlab
Can you be more specific ??? Instead of specifying whatever format you could actually look at the extension and specify the extension.If it is a video then you can read it with mmreader(),if it is an image then you read it with imread().So please specify the extension of the file which you want to load into MATLAB.
H2H -Harsha
It turns out I was using the right function with wrong parameters all along. I opened the file I wanted to open with fopen('filename')
and used the number that function outputs in A=fread(thenumber)
. That returned an array of each and every byte in the file by their decimal values. I'm sure I'll be able to use this data for my project.
Thanks to everybody for their help!
精彩评论