How can I convert text to ASCII?
조회 수: 1 (최근 30일)
이전 댓글 표시
I was trying to read sensor data on my smartphone using MATLAB and I downloaded udp sensor. Using udpport and readline command I could read the data I guess but I am not sure if it is the data because I can't understand the output. So how can I convert it to something I can understand?
My code;
u2 = udpport("LocalPort",8080,"EnablePortSharing",true)
data = readline(u2)
The output;
'¼=¾M =Q¥ø¿,]¿==i½h¯½-ÉüBÊÂB¥@¿®f B( @ ¼=¾M =PúÆ¿,¤¿<×=i½h¯½-ÉüBÊÂB¥@¿®f B( @ ¼=¾M =["п-¿;ù{=i½h¯½-ÉüBÊÂB¥@¿®f B( @ ¼=¾M =Z¿.kj¿;y>*z=äh=<4Bn@ÂB¥@¿®f B( @ ¼=¾M =V q¿.Í
¿:Éß>*z=äh=<4Bn@ÂB¥@¿®f B( @ ¼Z@»V >(Á =Ll¿.Ôh¿:Í8>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =Kkµ¿/TÍ¿:V.>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =Hôk¿/
¿:*·>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =P¿0jT¿9J°>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =JëO¿0$È¿9>>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =B\¿0c¿9©>*z=äh=<4B NÂ/Õ@°Rñ B @ ¼Z@»V >(Á =.)à¿/ëD¿9åÕ8h©¼UR~>0Á{B¡öaÂ/Õ@°Rñ B @ ¼Z@»V >(Á =.êy¿06Ö¿98h©¼UR~>0Á{B¡öaÂ/Õ@°Rñ B @ ¼` =)ê >\À=+Ë¿1iÈ¿8{a8h©¼UR~>0Á{B¤Â%tà@Ç; B @ ¼` =)ê >\À=5Ú¢¿2IÏ¿7Y8h©¼UR~>0Á{B¤Â%tà@Ç; B @ ¼` =)ê >\À=8Ý¿7üý¿1ß{8h©¼UR~>0Á{B¤Â%tà@Ç; B @ ¼` =)ê >\À=-b¿<¿-½8h©¼UR~>0Á{B¤Â%tà@Ç; B @ ¼` =)ê >\À=Bd¿¿)â8h©¼UR~>0Á{B¤Â%tà@Ç; B @ ¼` =)ê >\À=38¿E6Ë¿#v?Ê_?Õ½?÷þB¤Â%tà@Ç; B @ ¼` =)ê >\À=;>æ¿I» ¿t¦?Ê_?Õ½?÷þB¨¢[Â%tà@Ç; B @ ¼` =)ê >\À<Ä?¿R}ø¿ß{?Ê_?Õ½?÷þB¨¢[Â%tà@Ç; B @ =÷>À ¾æ;.-¿VöÙ¿Tø?Ê_?Õ½?÷þB~;ÂHÝy?þ B @ =÷>À ¾æ¼Êà¿Yó¿ 5?Ê_?Õ½?÷þB~;ÂHÝy?þ B @ =÷>À ¾æ½¦Hù¿`E¾ô?Ê_?Õ½?÷þB~;ÂHÝy?þ B @ =÷>À ¾æ½ÊÛB¿c¾÷¾åù?Ê_?Õ½?÷þB~;ÂHÝy?þ B @ =÷>À ¾æ½÷ò¿f¼ª¾ÕÍB?Ê_?Õ½?÷þB~;ÂHÝy?þ B @ =÷>À ¾æ¾'
댓글 수: 4
Rik
2021년 1월 8일
As I understand it, ASCII is a pretty basic encoding of text. It should already be recognizable. Or is this the 7 bit version? Then the conversion will be very tricky, but that would also have made the reading itself non-trivial.
If you find an online converter that does what you need you could post the link here and we could help you try to implement it in Matlab.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!