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


转载仅为学习,不会商用。
欢迎转载原创,附文链接。
原文地址:https://www.cnblogs.com/xdd1997/p/11315343.html