特殊:Badtitle/NS100:MATLAB
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/MATLAB }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/af | • {{#if: UbuntuHelp:MATLAB|Afrikaans| [[::MATLAB/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ar | • {{#if: UbuntuHelp:MATLAB|العربية| [[::MATLAB/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/az | • {{#if: UbuntuHelp:MATLAB|azərbaycanca| [[::MATLAB/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/bcc | • {{#if: UbuntuHelp:MATLAB|جهلسری بلوچی| [[::MATLAB/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/bg | • {{#if: UbuntuHelp:MATLAB|български| [[::MATLAB/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/br | • {{#if: UbuntuHelp:MATLAB|brezhoneg| [[::MATLAB/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ca | • {{#if: UbuntuHelp:MATLAB|català| [[::MATLAB/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/cs | • {{#if: UbuntuHelp:MATLAB|čeština| [[::MATLAB/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/de | • {{#if: UbuntuHelp:MATLAB|Deutsch| [[::MATLAB/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/el | • {{#if: UbuntuHelp:MATLAB|Ελληνικά| [[::MATLAB/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/es | • {{#if: UbuntuHelp:MATLAB|español| [[::MATLAB/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/fa | • {{#if: UbuntuHelp:MATLAB|فارسی| [[::MATLAB/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/fi | • {{#if: UbuntuHelp:MATLAB|suomi| [[::MATLAB/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/fr | • {{#if: UbuntuHelp:MATLAB|français| [[::MATLAB/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/gu | • {{#if: UbuntuHelp:MATLAB|ગુજરાતી| [[::MATLAB/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/he | • {{#if: UbuntuHelp:MATLAB|עברית| [[::MATLAB/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/hu | • {{#if: UbuntuHelp:MATLAB|magyar| [[::MATLAB/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/id | • {{#if: UbuntuHelp:MATLAB|Bahasa Indonesia| [[::MATLAB/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/it | • {{#if: UbuntuHelp:MATLAB|italiano| [[::MATLAB/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ja | • {{#if: UbuntuHelp:MATLAB|日本語| [[::MATLAB/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ko | • {{#if: UbuntuHelp:MATLAB|한국어| [[::MATLAB/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ksh | • {{#if: UbuntuHelp:MATLAB|Ripoarisch| [[::MATLAB/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/mr | • {{#if: UbuntuHelp:MATLAB|मराठी| [[::MATLAB/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ms | • {{#if: UbuntuHelp:MATLAB|Bahasa Melayu| [[::MATLAB/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/nl | • {{#if: UbuntuHelp:MATLAB|Nederlands| [[::MATLAB/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/no | • {{#if: UbuntuHelp:MATLAB|norsk| [[::MATLAB/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/oc | • {{#if: UbuntuHelp:MATLAB|occitan| [[::MATLAB/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/pl | • {{#if: UbuntuHelp:MATLAB|polski| [[::MATLAB/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/pt | • {{#if: UbuntuHelp:MATLAB|português| [[::MATLAB/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ro | • {{#if: UbuntuHelp:MATLAB|română| [[::MATLAB/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/ru | • {{#if: UbuntuHelp:MATLAB|русский| [[::MATLAB/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/si | • {{#if: UbuntuHelp:MATLAB|සිංහල| [[::MATLAB/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/sq | • {{#if: UbuntuHelp:MATLAB|shqip| [[::MATLAB/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/sr | • {{#if: UbuntuHelp:MATLAB|српски / srpski| [[::MATLAB/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/sv | • {{#if: UbuntuHelp:MATLAB|svenska| [[::MATLAB/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/th | • {{#if: UbuntuHelp:MATLAB|ไทย| [[::MATLAB/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/tr | • {{#if: UbuntuHelp:MATLAB|Türkçe| [[::MATLAB/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/vi | • {{#if: UbuntuHelp:MATLAB|Tiếng Việt| [[::MATLAB/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/yue | • {{#if: UbuntuHelp:MATLAB|粵語| [[::MATLAB/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/zh | • {{#if: UbuntuHelp:MATLAB|中文| [[::MATLAB/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/zh-hans | • {{#if: UbuntuHelp:MATLAB|中文(简体)| [[::MATLAB/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MATLAB | UbuntuHelp:MATLAB | {{#if: | :}}MATLAB}}/zh-hant | • {{#if: UbuntuHelp:MATLAB|中文(繁體)| [[::MATLAB/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:MATLAB|:MATLAB|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :MATLAB/zh | | {{#ifexist: MATLAB/zh | | {{#ifeq: {{#titleparts:MATLAB|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:MATLAB|1|-1|}} | zh | | }}
Parent page: Programming Applications
MATLAB R2006a Installation Instructions
1. Run the MATLAB installer Insert CD 1 of 3 and then
sudo sh /media/cdrom/install
2. Run MATLAB's post installation script
sudo /usr/local/matlab72/install_matlab
(discussed in this thread http://ubuntuforums.org/showthread.php?t=19855) 3. Start MATLAB (if you created simlinks):
/usr/local/bin/matlab
You can pass additional options to start MATLAB, in the format matlab -option. Here are a few of the most popular ones.
-nodesktop Start MATLAB in a console, without the GUI - much faster loading. -nosplash Don't show that annoying MATLAB splash screen as it loads. -nojvm Do not start Java support. This also causes -nodesktop. -r "command" Start MATLAB and execute the given command. -h Show more MATLAB options.
An example command would be matlab -nojvm -nosplash -r "1+1"
Installing from an ISO Image
Alternatively to burning the 3 CDs to cd-rom, you can just mount the iso image and install directly from it. Prepare iso mounting:
sudo mkdir /media/iso sudo modprobe loop
Then mount the first disk:
sudo mount MathWorks_2006b1m.iso /media/iso/ -t iso9660 -o loop
And to unmount it:
sudo umount /media/iso/
Modes of Operation
At a minimum, you don't need much to run MATLAB. It will run in the console without X just fine, though naturally missing some functionality such as graphing. Most users, however, use many of the bells and whistles. The Prerequisites section is made with that in mind. To use the MATLAB desktop, GUIDE, Simulink, and all the nice graphs, you need to have UbuntuHelp:Java installed, and the executable in your path. If you don't, you'll have to run from a terminal, which isn't always the greatest. A quick way to check to see if you have Java in your path is to open a terminal and type which java. If it comes back with something similar to /usr/local/bin, you're good to go, otherwise you need to follow the instructions in the UbuntuHelp:Java How-To. You will get far better performance making complex graphs if hardware accelerated openGL rendering is set up properly. Open up a terminal and run the following command.
glxinfo | grep direct
If the output is `direct rendering: Yes`, then you should be fine. Otherwise you might be able to get it working using non-free graphics drivers. See BinaryDriverHowto. If this doesn't solve your problem, you might have trouble getting direct rendering working on your card. If you are still interested, you might want to search for information on your specific card model and see if anyone else has gotten direct rendering working.
Missing cellfun.mexglx (and other files)
If you are installing Matlab (Version 7.0.1.24704 (R14) Service Pack 1) on a x86 machine with Ubuntu (Breezy Badger) there could be some problems with the permissions on file /etc/libc.so.6, which, by default, does not have executable permission and does not behave like it is expected by some scripts. When some scripts (install and startup scripts) try to query the version of the libc file, they are returned empty strings. Possibly because of this issue, some of the mexglx files are not installed and when matlab starts up, the script ${matlab_dir}/bin/util/oscheck.sh also reports the following error.
/opt/matlab/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Permission denied
The file ${matlab_dir}/toolbox/matlab/datatypes/cellfun.mexglx was not installed and this could cause problems when trying to execute a simple command such as ls, for e.g.,
>> ls ??? Attempt to execute SCRIPT cellfun as a function. Error in ==> iscellstr at 13 res = cellfun('isclass',s,'char'); Error in ==> ls at 16 if iscellstr(varargin)
One way to solve this would be to modify two lines in the scripts ${matlab_dir}/bin/util/oscheck.sh as well as in the script ${matlab_install_cd}/install. Line 697 of ${matlab_install_cd}/install