At the Matlab command prompt on old computer #1, enter a test command which will go into your history, like
rand(5)
The run the following to find the directory containing your history file, History.xml, on #1.
prefdir
On #2, run prefdir to find the directory containing History.xml on #2. If you are installing the same version, the directories will be the same.
Close matlab on #2.
Copy History.xml from #1 to the directory from #2. You will overwrite an existing History.xml file on #2.
Open Matlab on computer #2 and scroll through the history with the up arrow. You should see your test command and other older commands.