What code is it?
이전 댓글 표시
Is there someone recognize the following code and how to convert it to the normal data?
===================================================
MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Wed Oct 14 17:38:35 2020 _
IM Ù xœ-бKBQÇñojÖb ¦¯×Ú¡A„à
nWG—2x8ê ‚ƒ-MŽnºô'4‰[¸æ_Ðà ›¿wž.ç~îsϹ@岊çÚ’uz´R¼YÌð
¢¼Î[í Bîiq†cEÄ¥üÎZ•/Ô(Êw<˜¿Ù™oب²ã•9%Ù£gîò¨sH›”ù“½ÙãKï:Us%W¨›?ÈáËOü‘–7ÊûÖÏØ<UkyAÕÜ×±oùUÆ1ãßÜÐ}ì&y¤c,ÍC~4y2OÙþå ÝÜ(6 G xœãc``¨ b6 æ bA`d`aÈOÊ2ѾÎþÁ º,³8‘(礞ªžÊgë…`(_¼˄$ > ÆŽ ú xœ-ÒKH”QÆñÿ0ŸYd†±‹×Ô.d}S‹¦¤¢LjÓÅZË‚.ÒUpEáÒœŠr´B0)\ˆÝ Ê¢(‰ ¢‚À¨˜`ê9O3pæ=¿ùΜó¾ïwJ¶$LSœ®ñÿSTpBã|"Ĉ®#‡——ÉUZ‚%Äâb†§¬µ#ÖÙùÍby&73ì`Àî#Ç"¹š”ÝËJ;ÍCŘ÷t°PþÁ6»ˆFé
¯õkÌõdƒô‡ÝÖVƨ—Çy§U1m|bÜÎ^{ŒÙvÄWäbÍë4*9n/£‡Zù³ì^P#gÔ¾1]¬°Ø`繪¼341¥}cÎé_ÁƒÅAwUšoÑÙAͪ#8¯Á%”Ú÷y£Â^#Ê#ÃY.Ù)Øi6Ú•Z|’ŸÊ1f’GÌ—'¢ õì·¦ô]ë®ç™'—h·¹žÓöˆº]í.æ˜+ßc§ÓiÁ}éœX½þÀy©ž?§Ó>E¿²ˆy«,*äU¬±Û¹a_æ—2ˆõ¶Ú3xl_ Õîà–Ý£ú*\mÖnT‚;¹f?)ø#wì4«íW<³[ØdïỽK7 8I™óɪÁŸù&‚†è¶êô<¸_½îV/ƒ'Øîj›ùk§tû‚Ç5ÕrÌÝjâ¨ÝJ¹»»™Ûv/Ãö¾ÙÃìóÛx©Û ÿ ¯™‹ û xœ-Î1K‚QÆñ¿ùNAÔ`”ºT–Ý”JÒ›$¨!jhkª% šÃ‘‚D-B[»›PŸ ›„†š¤hqÈ¡ç=yáÞs÷árÎ(p€Õ¶ÇÿX5«çŋĘîNgÌá(Ðcš‹Ä™—ÃL‘· êÅq¬Äw›!äqöyR‰ã€K³ã„κç«ÌËR–KtX±ß?æOîY•KL2#÷¸bMî°aÎqHJÞåÄ\Q·uy–k³Ç›r™ªù‹_Òò
Oæ0¯lÉ1žÍqî4‹SÏ7sSåäG>ÌQÞÙ‘[|›‹ì“—»šÌ÷
댓글 수: 2
Steven Fried
2022년 3월 7일
Hi Paul, were you ever able to resolve this issue? It seems we have the exact same question as you, for reading the data from our SR865A lock-in amplifier. Please let us know if you were able to find a solution. Thank you!
Paul Hardy
2022년 3월 7일
답변 (2개)
"Is there someone recognize the following code..."
It isn't code, it is a binary .mat file (just as the text at the start of the file clearly states).
"... and how to convert it to the normal data?"
The recommended way it to load into an output variable (which is a structure):
S = load('name_of_the_file.mat');
and then access the fields of that structure. Or during development (i.e. from the command line) you can also use the command-syntax:
load name_of_the_file.mat
댓글 수: 11
Paul Hardy
2020년 10월 20일
Paul Hardy
2020년 10월 22일
Stephen23
2020년 10월 22일
"I have used your provided command S = load('name_of_the_file.mat'). No error appear."
Good. This means the file data was imported into the structure S.
"Unfortunately, I don't get any output when I use this command"
If there is no error then the file data has been imported into S, which is a scalar structure. As I wrote in my answer, you can access its fields, e.g.:
M = S.name_of_some_variable
Paul Hardy
2020년 10월 22일
Paul Hardy
2020년 10월 22일
The object obj1 is an instance of the visa class:
To use this object you will need to have the Instrument Control Toolbox installed and a valid license for it. Probably the other strings will also make sense in the context, e.g. this page discusses .mat files:
This command might be the origin of that file (and also explains how to load the file data):
I do not have this toolbox, so I cannot check any of this.
Paul Hardy
2020년 10월 22일
Walter Roberson
2020년 10월 22일
No! You cannot get useful data from a mat file using fread. You need to load() it or use matFile()
"Would A give me the converted data?"
The literal answer is "yes", it will "convert" the contents of some random binary file (interpreted as uint16) into some most likely very meaningless values. Unlikely to be very useful, but nothing is stopping you from trying.
I suspect that the real problem started with how the data was saved. I have no idea what special types/data encoding/... the Instrument Control Toolbox uses, but that would be where I would start looking.
Paul Hardy
2020년 10월 23일
Walter Roberson
2020년 10월 20일
0 개 추천
That is not code. That is a .mat file created on a Windows system about a week ago.
Possibly someone accidentally did a save naming a .m file.
The code is gone, replaced with variables. There is no way to get the code back from this file.
You have to hope that there is a backup for the file. Look to see if you have any .asv (autosave) files.
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!