Matlab查看本机IP地址---xdd

复制粘贴于http://www.matlabsky.com/thread-28597-1-1.html

1 [s, r]=system('ipconfig')
2                % r=regexp(r,'IP Address. . . . . . . . . . . . : \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}','match')
3                 r=regexp(r,'IPv4 地址 . . . . . . . . . . . . : \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}','match');
4                 r=r{1}
5                 r=regexp(r,'\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}','match')
6                 lip=r{1}
7                 disp(['本机IP为:',lip])

write by xdd  2019-08-07  15:02:17

 

posted @ 2019-08-07 15:04  xdd1997  阅读(1208)  评论(0)    收藏  举报