开发者

Loading a file into MATLAB as it is? [closed]

开发者 https://www.devze.com 2023-03-16 14:44 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussio开发者_StackOverflow社区n. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消