Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How can I convert a file that contains formatted/encrypted letters into normal text using Matlab? I think it is ASCII This is how the file
How can I convert a file that contains formatted/encrypted letters into normal text using Matlab? I think it is ASCII
This is how the file looks like in .txt file ( its just part of it) It culd be any of the following formats: binary double (double-precision floating point), binary single (single-precision floating point), or binary int32 (signed 32 bit integers), I don't know which one it is, and these commands can be used to help execute the function.
- fopen, fclose, fread, fwrite, fseek
- char, fprintf, disp, load, circshift, length, find, strfind, cell
- if, while, for, switch
Any help will be much appreciated!
2. Recommendations In order to succeed, you have to write your own Matlab script that contains commands that achieve the following: 1) Determine which format your chunk is written in. Is it binary double (double-precision floating point), binary single (single-precision floating point), or binary int32 (signed 32 bit integers)? How can you determine this, given you do not know what the contents are? 2) After you believe you have read your chunk data in the correct format, your next challenge is to find the shift S for your codifying key, use it for shifting the expected key and remove it from the received chunk. Here, you can consider searching for this manually (shifting the key with different S, removing the shifted key from the data and printing it as char in MATLAB to see if it is English text). Even better, see if you can automate the search by considering the fact that you know that the recovered text should be in English. 3) Once you have succeeded in the previous two steps, you will need to write code that automatically reads the chunk in the correct way, finds the shift S and then provides the English text as output. This will be your submission on Moodle, as described below. @ b@Z@^@L@_@b@0@^@@M@ ] @@^@Z@ @ #a@\@a@`@ b@@a@ c@D@t`@b@@a@@P@a@_@ CQKGHGU@\@ a@@] @P@ P@& ]@^@@_@E@a@\@@_@K@@b@ [@``Q@ @ c@H@^@N@R@X@U@N@^@i_@b@\@ a@@`@N@ b@@a@^@J@_@@_@@@a@ `@c@]@t`@`@b@\@] @@S@0@:@J@D@H@G@=@A@^@Z@@b@tb@ta@[@J@@`@i a@@a@J@ta@_@^@@a@t `@ _@Q@@a@ta@N@i_@`@^@M@ b@ta@a@ `@L@@Y@M@^@a@\@]@@`@@Q@]@ta@P@`@]@@^@A@ c@Y@ @R@D@L@@U@_@@_@t`@F@Z@ b@]@@^@ [QR@G@;@D@B@:@>@I@W@a@`@]@b@ b@ a@@P@_@`a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G@>@6@^@^q_@N@ a@i [@]@@^@_@_@b@b@E@@_@b@N@@_@a@@a@E@_@@^@@b@ a@E@`b@ `@Z@@`@_@b@a@\@Q@Z@`@^@M@_@t`@ [@ [Q_@Z@@_@@] @`@G@]@`@L@#`@`@^@Q@b@ (@`c@ a@D@`b@]@D@@c@\@^@C@` @@a@t`@]@^@_@N@]@`@ \@J@@@J@2@D@F@2@H@Y@@`@]@N@^@`@`a@ cQa@K@G@N@\@@]@\@Z@]@0@@b@@Z@ @l@@Q@a@@a@ P@@a@` `@ ]@K@Y@@`@@`@^@@]@`@^@@Z@0@Z@`b@^@ @@]@a@Z@A@I@L@\@ @_@`b@J@[@ta@@a@P@@t`@@`@_@b@`a@ 2. Recommendations In order to succeed, you have to write your own Matlab script that contains commands that achieve the following: 1) Determine which format your chunk is written in. Is it binary double (double-precision floating point), binary single (single-precision floating point), or binary int32 (signed 32 bit integers)? How can you determine this, given you do not know what the contents are? 2) After you believe you have read your chunk data in the correct format, your next challenge is to find the shift S for your codifying key, use it for shifting the expected key and remove it from the received chunk. Here, you can consider searching for this manually (shifting the key with different S, removing the shifted key from the data and printing it as char in MATLAB to see if it is English text). Even better, see if you can automate the search by considering the fact that you know that the recovered text should be in English. 3) Once you have succeeded in the previous two steps, you will need to write code that automatically reads the chunk in the correct way, finds the shift S and then provides the English text as output. This will be your submission on Moodle, as described below. @ b@Z@^@L@_@b@0@^@@M@ ] @@^@Z@ @ #a@\@a@`@ b@@a@ c@D@t`@b@@a@@P@a@_@ CQKGHGU@\@ a@@] @P@ P@& ]@^@@_@E@a@\@@_@K@@b@ [@``Q@ @ c@H@^@N@R@X@U@N@^@i_@b@\@ a@@`@N@ b@@a@^@J@_@@_@@@a@ `@c@]@t`@`@b@\@] @@S@0@:@J@D@H@G@=@A@^@Z@@b@tb@ta@[@J@@`@i a@@a@J@ta@_@^@@a@t `@ _@Q@@a@ta@N@i_@`@^@M@ b@ta@a@ `@L@@Y@M@^@a@\@]@@`@@Q@]@ta@P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e`@a@J@D@@b@`@^QN@ c@``@_@@I@@@^Q ]@J@^@ @]@b@t`@B@@Y@ta@^@F@^@@_@i_@t`@\@@\@@_@CT@:@B@6@G@>@6@^@^q_@N@ a@i [@]@@^@_@_@b@b@E@@_@b@N@@_@a@@a@E@_@@^@@b@ a@E@`b@ `@Z@@`@_@b@a@\@Q@Z@`@^@M@_@t`@ [@ [Q_@Z@@_@@] @`@G@]@`@L@#`@`@^@Q@b@ (@`c@ a@D@`b@]@D@@c@\@^@C@` @@a@t`@]@^@_@N@]@`@ \@J@@@J@2@D@F@2@H@Y@@`@]@N@^@`@`a@ cQa@K@G@N@\@@]@\@Z@]@0@@b@@Z@ @l@@Q@a@@a@ P@@a@` `@ ]@K@Y@@`@@`@^@@]@`@^@@Z@0@Z@`b@^@ @@]@a@Z@A@I@L@\@ @_@`b@J@[@ta@@a@P@@t`@@`@_@b@`a@Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started