Showing posts with label Mathematica. Show all posts
Showing posts with label Mathematica. Show all posts

Saturday, March 4, 2017

Copying and pasting data from Excel to Mathematica

Type into Mathematica ImportString["", "TSV"]

Paste the excel data between the empty double brackets.

Source: http://mathematica.stackexchange.com/questions/8997/cut-and-paste-data-from-a-spreadsheet

Monday, February 1, 2016

Mathematica: Clear all variables except one

To clear all variables except x, for example, then input the following

AppendTo[$ContextPath, "special`"];
special`x;

Sunday, January 24, 2016

Add shortcut for quit kernel in Mathematica

1. Navigate to Program Files/Wolfram Research/.../.../SystemFiles/FrontEnd/TextResources/Windows/
2. Edit the KeyEventTranslations.tr file
3. Example: If you want to add a shortcut for quit kernel, then insert the following into the file:       

Item[KeyEvent["q", Modifiers -> {Control}],
               FrontEndExecute[
                       FrontEndToken[
                                SelectedNotebook[],
                                "EvaluatorQuit",
                                Automatic
                       ]
               ]
       ],

This will assign Ctrl+q as a shortcut for quit kernel