View Full Version : Can't type ^ in matlab

October 31st, 2007, 02:26 AM
Hey guys,

I'm running Matlab 7.5 on Gusty and everything works fine, except that I can't type the power symbol "^". After I press shift+^ key, if I type anything it will print a superscript number just like a power operation, but matlab does not recognize it. Does anyone know what can it be? Thanks for the help, I'm really going nuts on this one!

November 6th, 2007, 10:40 AM
same problem here, also on gutsy, but unfortunately no solution either!

November 6th, 2007, 04:36 PM
Stupid question: Did you try to press SPACEBAR after "SHIFT+^" so the "^" character actually appears on the screen? :)

November 6th, 2007, 05:11 PM

November 6th, 2007, 08:14 PM

Thank you very much, that saved my day!
I had to adapt the script a bit to the german layout, but it's working now!

I start matlab now like this:

echo keycode 49 = asciicircum degree asciicircum degree notsign notsign notsign notsign | xmodmap -
echo keycode 49 = dead_circumflex degree asciicircum degree notsign notsign notsign notsign | xmodmap -


November 7th, 2007, 01:57 PM
hi there,

i followed the following suggestion to insert the two lines about java and awt toolkit into matlab's startup script for running matlab with compiz-fusion:

export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/
export AWT_TOOLKIT=MToolkit

matlab worked fine in general, but i ran into two problems, one of which is why i post here :)
the problems were:
1. can't type ^, ~, ` (or any other dead keys i believe, haven't tried though)
2. can't type any text after switching to a figure window and then back to matlab's command window

however, i found out that the second line of code (export AWT_TOOLKIT=MToolkit) is not needed anymore with recent versions of sun java.

see http://gentoo-wiki.com/Compiz/Troubleshooting, Section "JAVA program does not show contents" for details.

by removing the second line, both of my problems are solved (no xmodmap modifications needed), and matlab (and simulink!) still run fine.

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

matlab version: (R2007b)

uname -r: 2.6.22-14-generic

January 9th, 2008, 04:38 PM

I had the same problem. Just solved it by typing in the matlab console:

!setxkbmap -variant nodeadkeys

Hope this helps!

Josep C.-