MATLAB: How to program matlab to copy highlighted text

matlab functionscript

Normally when we highlight text from Word files or web pages a simple Ctrl+C command copies the highlighted text to be pasted elsewhere. I can program MATLAB to automatically highlight important parts of a text but somehow I am failing to copy them into a numerical or string arrays. I have tried the clipboard('copy',data) commands but they somehow did not work for me.
Does anyone know how to program matlab to execute simple copy and paste commands? Please let me know
Related Question