yarp_write.m
来自「一个语言识别引擎」· M 代码 · 共 34 行
M
34 行
% show how to call YARP from Matlab.
% Write a bottle (quivalent to yarp write)
% -nat
LoadYarp;
done=0;
port=Port;
%first close the port just in case
port.close;
disp('Going to open port /matlab/write');
port.open('/matlab/write');
disp('Please connect to a bottle sink (e.g. yarp read)');
b=Bottle;
while(~done)
reply = input('Write a string (''quit'' to quit):', 's');
b.fromString(reply);
port.write(b);
if (strcmp(reply, 'quit'))
done=1;
end
end
port.close;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?