Как запустить matlab после установки linux

Документация

Запуск MATLAB на платформах Linux

Просмотреть поддерживаемый Linux ® распределения, выберите вкладку Linux на Системных требованиях для MATLAB.

Запустить MATLAB ® на платформах Linux ввести matlab в подсказке операционной системы. Если вы не настраивали символьные ссылки в процессе установки, то введите matlabroot /bin/matlab matlabroot имя папки, в которой вы установили MATLAB. Чтобы видеть папку, ввести matlabroot .

После стартового MATLAB открывается рабочий стол. Настольные компоненты, которые были открыты, когда вы в последний раз закрываете MATLAB, вновь открылись. Если DISPLAY переменная окружения не установлена или недопустима, затем рабочий стол не отображается.

MATLAB автоматически добавляет userpath папка к пути поиска файлов.

Чтобы настроить запуск, смотрите, Задают опции запуска.

Папка запуска MATLAB является папкой, вы находитесь в том, когда вы получаете подсказку MATLAB. Чтобы изменить папку запуска по умолчанию, смотрите Папку Запуска MATLAB.

Если вы испытываете затруднения стартовый MATLAB, то смотрите MATLAB Installation, Activation & Startup Help.

Запущение папки

На платформах Linux папка запуска по умолчанию является папкой, с которой вы запустили MATLAB.

Задавать userpath как папка запуска, установленная значение переменной окружения MATLAB_USE_USERWORK к 1 перед запуском. По умолчанию, userpath userhome /Documents/MATLAB . Задавать другую папку для userpath , и для других опций, вызовите MATLAB userpath функция.

Выполните СКРИПТ MATLAB от удаленного ssh Вход в систему

Выполнить hello.m скрипта MATLAB через удаленный вход в систему ssh, в типе окна терминала:

Источник

Как я дружил MatLab и C++ в Linux


Прошла пора дипломов и я хочу поделиться своим рецептом его выполнения. Итак: тема сложная, времени мало, писать все «с нуля» или искать готовые библиотеки — нет большого желания, тем более что мне важна скорость работы системы, а от левых самописных библиотек можно ждать любого подвоха.
Надо сказать что размышлял я недолго и пришел к следующим выводам:

  1. Операционная система — тут думать особо не пришлось: т.к. я являюсь поклонником Debian (к слову: мое решение можно перенести и на Windows).
  2. Интерфейс будущей программы — C++, Qt.
  3. Логика программы — MatLab.

Подготовка

Для работы системы нам необходимы следующие компоненты:

  1. Так называемый MATLAB Compiler Runtime. Это свободно распространяемый набор динамических библиотек MatLab. Скачать его можно с официального сайта и пользовать на свое усмотрение.
  2. Собственно сам Qt. Скачивается из репозиториев Linux, либо с официального сайта.

Установка

MATLAB Compiler Runtime распространяется в zip архиве. Внутри вы найдете файл install.sh. После его запуска откроется графический инсталятор, который в 3 клика сделает свое дело.
Qt ставится из репозиториев. Если вы скачали свеженькую версию с сайта, то необходимо выполнить следующие действия:
Под рутом:

Дальнейшую установку производим обязательно от имени пользователя и в каталог /opt/QtSDK
С установкой закончили, переходим к настройкам:
Необходимо прописать библиотеки в системе, для этого:

И прописать переменную окружения XAPPLRESDIR (необходимы права рута):

Далее необходимо скопировать файл: /usr/local/MATLAB/MATLAB_Compiler_Runtime/v716/X11/app-defaults/Matlab в домашнюю директорию пользователя. Вообще, в теории, этого делать не надо, но без этого ничего не работает. Это известный баг, но его пока еще не исправили.
Пройдусь немного по путям к библиотекам:

  • Часть /usr/local/MATLAB/MATLAB_Compiler_Runtime/ может меняться в зависимости от того, куда вы устанавливали MCR.
  • Часть v716/ это версия самого MatLab и она тоже может меняться.
  • Часть glnxa64/ для 64 битной ОС и glnxa32 для 32 битной ОС.
Читайте также:  Linux calc dir size

Да и вообще. Все эти пути будут написаны на финайльной стадии установки MCR, но копировать их я не советую и предлагаю перепроверить и переписать все вручную (не знаю в чем тут дело, но у меня на двух разных машинах тупое копирование этих путей не дало результатов). Также после установки будет еще один путь: /usr/local/MATLAB/MATLAB_Compiler_Runtime/v716/sys/os/glnxa64, его прописывать я не советую: т.к. после этого у меня отказались запускаться все программы, а без него все прекрасно работает.

Расчехляем MatLab

Теперь можно писать логику будущего приложения. Создаем новый m-файл и пишем новую функцию. Функция у нас будет простая: будем суммировать два переданных массива чисел:

Все готово для компиляции этой функции в динамическую библиотеку:

  1. Пишем в консоли MatLab: deploytool.
  2. В открывшемся окне пишем имя проекта, его расположение а из выпадающего списка выбираем C Shared library и нажимаем OK. Учтите, что в Linux названия библиотек начинается со слова lib, поэтому и проект стоит называть libsum.prj
  3. В окне Exported Functions нажимаем на Add files и добавляем только что созданную функцию.
  4. Нажимаем на кнопку Build и дожидаемся окончания компиляции.

После компиляции в папке с проектом окажется папка distrib, в которой и будет находиться наша библиотека и заголовочный файл.
На этом работа с MatLab закончена.

Расчехляем Qt

Запускаем Qt и создаем новый проект.
В pro файле прописываем пути к библиотекам и заголовочным файлам:

Источник

Запуск matlab в Linux

Matlab Guide. Запуск одной кнопки нажатием второй
Здравствуйте. Вопрос, вероятно, довольно простой, но я не могу сообразить как это работает.

можно ли в Matlab создать библиотеку для С++ и использовать ее без вызова Matlab?
Возможно ли с помощью команды deploytool или какой-то другой команды создать библиотеку .dll.

Parse error at case matlab: usage might be invalid matlab syntax
Сразу говорю: В матлабе работаю ровно месяц. В общем, делаю форму, для вывода графика в axix.

Почему программа написанная в MATLAB 5.2 не работает в MATLAB 7.5 ?
Здравствуйте уважаемые форумчане. У меня возникла проблема с программой, написанной в MATLAB 5.2.

например у меня запускается так:

/home/ВашеИмя_В_системе/Matlab2015a/bin/matlab -desktop -softwareopengl

тут важно запомнить при установке куда вы установили матлаб, в какую папку

ключи -desktop -softwareopengl можно не указывать

Создай ярлык и пропиши в нем подобную команду
/usr/local/MATLAB/R2012b/bin/matlab -desktop
Вместо R2012b у тебя будет своя версия Matlab. Посмотри по аналогии что у тебя в указанном месте находится.

Помощь в написании контрольных, курсовых и дипломных работ здесь.

Производительность Matlab 6.5 и Matlab r2013b
Есть два ноутбука: 1.Intel Celeron Dual-Core T3100 1.90GHz 2ГБ ОЗУ WinXP (32bit) — Матлаб 6.5.

Открытие файла Matlab 7.14 в Matlab 7.12
доброго всем вечера.такая вот проблемка.создал файл в матлабе,но в версии 7.14 немного заргуженнее.

Как открыть модель, сделанную в Matlab 2017b, в Matlab 2012b?
Есть модель (.mdl) создана в Matlab 2017b. Как её открыть в Matlab 2012b?

Запуск скрипта MATLAB
Доброго времени суток! Знающие люди, подскажите как запустить из делфи скрипт матлаба или функцию.

Источник

Ubuntu Documentation

Introduction

MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.

You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas.

Читайте также:  Изменение расположения экранов windows 10

MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications.

MATLAB R2014b on Ubuntu 14.04

From ISO

  • First, mount the .iso file of the image with right-click, Open with and select Disk image mounter (if required).
  • Open a terminal and change to the mounted image file. For example:
    • cd /media/username/MATHWORKS_R2014A

From Download

Download the install file from http://www.mathworks.com/downloads/

  • Unzip and open downloaded directoy
  • Install

    • Run the installer as a super user
      • sudo ./install
    • Follow the instructions of the installer and install in /usr/local/MATLAB/R2014a
    • To add an entry to the launcher and some other features, install the matlab-support package:
      • sudo apt-get install matlab-support
    • During the installation you have to confirm the installation path of matlab and could restrict the installation only to certain users (which I did not require). In addition you could rename the GCC libraries, but I had no problems so far so I didn’t deactivate those.
    • After completion, you have to change the ownership of the .matlab folder in the home folder to your own user account if you do not want to run Matlab as a super user.
      • sudo chown username -R

        Now Matlab should also be launchable through unity and should work as intended.

        MATLAB R2012a

        Important Note Regarding Ubuntu 12.04

        MATLAB R2012a was released on March 1, 2012. Please note that this is prior to the release of Ubuntu 12.04. Consequently Ubuntu 12.04 is not a supported operating system for MATLAB R2012a as it can be seen in the MATLAB Roadmap.

        MATLAB R2012a users are strongly encouraged to install R2012a on Ubuntu 10.04 LTS or Ubuntu 10.10 for best results. Help for the installation of MATLAB R2012a on Ubuntu 12.04 will however be given through this tutorial.

        Important Note Regarding Student version (32-bit)

        Unfortunately, 32-bit is the only version available to students.

        If you have a 64-bit system, you will have some trouble but it is normally possible to go through each of them and the details are in the Troubleshooting section.

        The following helps you be a length ahead of these problem. If you have a 64-bit system, you can still install 32-bit version of MATLAB. However, you will need to install the «ia32-libs» package before the installation. If you have Ubuntu 13.10 or later, check out this thread for more information.

        Once it is installed, run the installer with the -glnx86 argument to force it to use 32-bit

        Though for R2012a it is not necessary anymore. If you don’t run it with the -glnx86 argument, MATLAB will just say

        at the start of the installation. And it will use 32-bit.

        Then, just follow the instructions of the Installation Instructions section.

        After the installation, you will need to run MATLAB with the -glnx86 argument to force it to use 32-bit

        See the Troubleshooting section for more details on this.

        Installation Instructions

        Basic

        You will need superuser privileges. The assumption is that MATLAB install files are located at /media/MATHWORKS_R2012a in your filesystem.

      See the Troubleshooting section if you get into trouble during the installation.

      1. Run the MATLAB installer with the following Terminal command (The -v argument is for the install script to be verbose which means, it is more likely to warn you if something weird happens):

      If it complains about java, try installing install »OpenJDK Java 6» package because MATLAB is not compliant with Java 7.

      2. When prompted to ‘Choose installation type‘ you should select custom. This will allow you to create symbolic links to MATLAB in /usr/local/bin.

      3. When prompted to ‘Specify installation folder‘ it is recommended that you use the default folder /usr/local/MATLAB/R2012a (or the default /usr/local/MATLAB/R2012a_student if you have a student version).

      If you have a student version, the default folder will be /usr/local/MATLAB/R2012a_Student.

      4. When given the option to ‘Create symbolick links to MATLAB scripts in:‘ it is recommended that you check the box and use the supplied path /usr/local/bin.

      5. You can check that your installation work by executing the following command

      See the Troubleshooting section if you get errors.

      Create A MATLAB Launcher/shortcut

      Automatic option: install package «matlab-support», sudo apt-get install matlab-support or via the Software Center on the dashboard.

      Manual option as follows.

      2. Get the launcher file:

      If you have the student version of MATLAB (or simply the 32 bit version) on a 64 bit system, you will need to modify this file. Run

      Then uncomment #Exec=matlab -arch=glnx86 -desktop and comment Exec=matlab -desktop (by adding or removing the # character).

      If you get two MATLAB launcher icons in your Unity laucher, try uncommenting the following line in /usr/share/applications/matlab.desktop:

      If your launcher does not work, see the Troubleshooting section.

      MEX functions

      Warning

      The content of this section has been written for R2011a with Ubuntu 10.04 and 10.10. It may vary a lot if you are using the R2012a with Ubuntu 12.04.

      If you try to compile MEX functions you may see a message like the following:

      Note this is a warning — the MEX function will still compile.

      The following instructions will setup gcc 4.3 and make it the default compiler for MATLAB:

      2. Make a MATLAB specific bin directory for gcc symlink.

      3. Symlink gcc to gcc-4.3 via user MATLAB specific bin directory.

      4. Add MATLAB specific bin directory to the front of your system $PATH within your local startup.m file.

      Steps 3 and 4 above may not work for at least one instance of a user trying to compile using MEX in MATLAB R2011a running on Ubuntu 10.10. An alternative is to do the following:

      • 3a. At the MATLAB Command Window prompt, type:

      and choose option 2 which says:

      This will copy to your home directory a local copy of the file mexopts.sh.

      • 4a. Then edit this local file:

      and replace all instances of CC=’gcc’ to CC=’gcc-4.3′, CXX=’g++’ to CXX=’g++-4.3′, and FC=’gfortran’ to FC=’gfortran-4.3′. Save and exit. The next time you run MEX in MATLAB to compile it will work properly.

      For more ideas, try this thread or this one.

      Troubleshooting

      No MATLAB bin directory for glnxa64

      If MATLAB tells you

      when you launch it, you will need to force it to use glnx86.

      Solution for the command line (CLI) launch

      If you like launching MATLAB from the command line, you will maybe find it inconvenient to write -glnx86 each time you need to launch it. You can then add it in your

      /.bashrc (at the end if you hesitate where to put it)

      Solution for the graphical (GUI) launch

      You will need to add the -glnx86 argument to matlab in the exec line of your file /usr/share/applications/matlab.desktop If you have followed the ‘Create a MATLAB Launcher’ section, you can just comment the line with the argument -glnx86 and uncomment the next line as explained in the file.

      libc.so.6 not found

      If you have Ubuntu 12.04 you like get the following error when running Matlab graphically:

      Источник

      Читайте также:  Windows update an error has occurred
    Оцените статью