read the data of a subscriber in matlab

asked 2015-01-12 08:48:51 -0600

psfa_fz gravatar image

Hi,

I want to use data from a topic to do data analysis in matlab. I set up a subscriber and call a callback function (example from matlab support document) like:

subscriber = rosmatlab.subscriber('TOPIC', 'std_msgs/String', 1, node); subscriber.setOnNewMessageListeners(@function1);

function1 does not have return values so if function1 looks like:

function function1(message) disp(char(message.getData())); end

,I can not access message.getData() in the original script. So how can I do that?

edit retag flag offensive close merge delete