Commit c9b6d0f1 authored by Tom's avatar Tom

functionlet for googling error messages directly from matlab

parent 83599581
% gtem: Google The Error Message
%
% gtem() - Opens a web browser and searches google
% for the last MATLAB error message
% gtem('some text') - Searches google for the typed text
%
% Tom Marshall
function gtem(msgtext)
if nargin < 1
msgtext = [ 'MATLAB "' lasterr '"'];
else
msgtext = [ '"' msgtext '"'];
end
% replace carriage returns with spaces
returns = strfind(msgtext, newline);
msgtext(returns) = ' ';
preamble = 'https://google.com/search?q=';
web([preamble msgtext]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment