How can I convert text to ASCII?

조회 수: 1 (최근 30일)
Ezgi Ecevit
Ezgi Ecevit 2021년 1월 8일
댓글: Ezgi Ecevit 2021년 1월 8일
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=<4Bœn@ÂB¥@¿®f B( @  ¼š€=€¾M‹ =V q¿.Í
¿:Éß>*z=äh=<4Bœn@Â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Ö¿9œ8h©¼UR~>0Á{B¡öaÂ/Õ@°Rñ B @  ¼“` =)ê >\À=+‡Ë¿1iÈ¿8{a8h©¼UR~>0Á{B¤‚Â%tà@­Ç; B @  ¼“` =)ê >\À=5Ú¢¿2IÏ¿7™Y8h©¼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
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.
Ezgi Ecevit
Ezgi Ecevit 2021년 1월 8일
I have downloaded a sensor app which I can obtain the outputs as xml format and I can read the data now. Thank you so much for your concern...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by