How do you retrieve the selected text in MATLAB?

前端 未结 3 1267
伪装坚强ぢ
伪装坚强ぢ 2021-01-05 23:07

MATLAB has several selection-sensitive capabilities. For example, if you select some text and press F9, it evaluates your selection. (Unless you\'ve remapped your keyboard

3条回答
  •  我在风中等你
    2021-01-05 23:59

    I don't believe there is any way to control or read the selection from the Matlab text editor, there is no mention of such an API on the Mathworks website (at least from a quick search on Google). If you want this functionality to enable more advanced text editing, then you might want to consider setting the .m file editor to an external editor (http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/brxijcd.html). It may be possible to read the selection from a UIcontrol in a custom GUI, but I don't think this is what you want.

提交回复
热议问题