Anyone figure out how to send code from FireFox/Chrome to MATLAB for evaluation?

1 view (last 30 days)
In the MATLAB Help Browser, you can right-click a text selection and choose 'Evaluate Selection' to evaluate it in the MATLAB Command Window. It would be super handy to be able to do the same by right-clicking a line(s) of MATLAB commands in FireFox/Chrome and selecting a command like 'Evaluate Selection in MATLAB'.
Anyone know how this could be done? In Internet Explorer I think you could do this in a Javascript bookmarlet or plug-in by using the ActiveXObject function to grab onto a MATLAB Automation Server handle, but this is only available in IE and not Firefox/Chrome. Anyone have ideas on how this could be done in non-IE browsers?
Cheers

Answers (2)

the cyclist
the cyclist on 6 Mar 2013
  1 Comment
Eric Sampson
Eric Sampson on 6 Mar 2013
I don't think so, or at least not as seamlessly as I'd like :) In that case it seems to me that you'd always need a browser tab open to the 'served' webpage, and then you could maybe copy-paste text into it for execution in the MATLAB engine. I could just as easily copy-paste directly into the MATLAB command window :) What I'm thinking of is the situation where you have some MATLAB commands in your browser, say from an online tutorial or in an email, and you could right-click the highlighted text and send it to your local MATLAB instance for evaluation.

Sign in to comment.


Elen Walker
Elen Walker on 1 Nov 2018
In the MAT LAB Help Browser, you can right-click a content choice and pick 'Assess Selection' to assess it in the MAT LAB Command Window. It would be super helpful to have the capacity to do likewise by right-clicking a line of MAT LAB directions in IE/Chrome and choosing an order like 'Assess Selection in MAT-LAB.To know more follow the guidelines on err spdy protocol error

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!