https://kr.mathworks.com/help/ros/ref/sendgoalandwait.html
sendGoalAndWait - Send goal message and wait for result - MATLAB
This MATLAB function sends a goal message using the specified action client to the action server and waits until the action server returns a result message.
sendgoalmessagewaitresult