Add Missing Launcher for MatLab in Ubuntu
Launch Terminal
1.download your own icon-
sudo wget
http://upload.wikimedia.org/wikipedia/commons/2/21/
Matlab_Logo.png -O /usr/share/icons/matlab.png
2.create launcher file
sudo touch /usr/share/applications/matlab.desktop
3.edit launcher file
sudo nano /usr/share/applications/matlab.desktop
4.add following into the launcher file.
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/matlab.png
Name=MATLAB R2014a
Comment=Start MATLAB - The Language of Technical Computing
Exec=/usr/local/MATLAB/R2024b/bin/matlab -desktop
Categories=Development;
Save & lauch matlab from icon.
Lets write simple script to display triangle as follows
Create Following Script in MatLab& Run.
clc
clear all
close all
x=[0,1,2]
y=[0,1,0]
plot(x,y,'Color','blue','LineWidth',1);
area(x,y,'FaceColor','green');
Now save it & run,IF you got low level graphic error then
cd /usr/local/MATLAB/R2024b/bin
now launch matlab as
./matlab -softwareopengl
Now Try to run script if this time script render
triangle then
In Matlab terminal
opengl('save','software')
This will add prefernces to matlab wrt opengl
Exit & launch Matlab from Launcher instead of command line &
recheck if it is rendering Triangle as previously.
No comments:
Post a Comment