Create 'symbolic links to MATLAB scripts' and Launcher and Desktop shortcut

I have Ubuntu 14.04.1 LTS.
When asked about creating 'symbolic links to MATLAB scripts' during installation, I mistakenly kept that unchecked. Now how can that be fixed without re-installing MATLAB all over again?
I used the following but I don't know if it is fixed:
ln -s $MATLAB/bin/matlab matlab
and how to create launcher and desktop shortcut? I did the following:
sudo apt-get install matlab-support
It seemed to be installing something but after it's done, I still don't have launcher and desktop shortcut. What do I do?

 Respuesta aceptada

You need to create a symbolic link into a directory where is set in PATh. For exmaple, to create MATLAB symbolic link in /usr/local/bin, please try
sudo ln -s $MATLAB/bin/matlab /usr/local/bin/matlab
Then you can launch MATLAB by just typing matlab.
Also, to create a launcher in Desktop, after installing matlab-support please search MATLAB in Applications and drag & drop the icon to your Desktop.

6 comentarios

<p>Thank you! Btw 'Drag and drop' didn't work for me. It said, "Permission denied". I "copied to" the desktop from _/usr/share/application_ instead (which worked for me).
matlab does not show up in nautilus, but I can open it from the command line.
Had this same problem and Kojiro's answer fixed it! Thank you. New to Linux so this was very helpful.
Tristan Croizer
Tristan Croizer el 4 de Dic. de 2018
Editada: Tristan Croizer el 4 de Dic. de 2018
This is a workaround, not a solution. The MATLAB installer creates symlinks beyond just matlab, and I want to be sure that I have all the symlinks MATLAB would have installed had I clicked the checkbox to begin with. If I'm doing it manually, how do I know I didn't miss any? Is there any reason why the MATLAB Installer doesn't allow you to run this step without redownloading all of the files and taking an hour of my time? It's frankly absurd that the MATLAB installer doesn't allow you to choose what actions to take - instead, it forces you to complete the entire process, even when it isn't necessary. If this functionality does exist, it's certainly well-hidden.
Linking the "matlab" file didnt work for me. Says cannot find the license. I think I will need to redo the installation directly to /usr/local/bin
Oh wait, ignore. I see the problem. I did "su" not "sudo" and am still user "root". Once I exited the su then I became regular user again and the license is fine.

Iniciar sesión para comentar.

Más respuestas (1)

% Check for Simulink License
if ~license('test', 'Simulink')
error('Simulink license is not available. Please ensure you have a valid license.');
end
% Create a new Simulink model
model = 'InductionMachineModel';
new_system(model);
open_system(model);
% Add necessary blocks from Simscape Power Systems and basic Simulink libraries
% Ensure the block paths are correct for your Matlab version
add_block('powersys/Machines/Asynchronous Machine', [model '/Induction Machine']);
There is no block named 'powersys/Machines/Asynchronous Machine'

Caused by:
Error using solution (line 13)
Unable to load block diagram 'powersys'
add_block('simulink/Sources/Step', [model '/Input Voltage']);
add_block('simulink/Sinks/Scope', [model '/Scope']);
% Configure the Asynchronous Machine block with example parameters
% Adjust parameters according to the specific characteristics of your induction machine
set_param([model '/Induction Machine'], 'StatorResistance', '0.435');
set_param([model '/Induction Machine'], 'RotorResistance', '0.816');
set_param([model '/Induction Machine'], 'MutualInductance', '0.005');
set_param([model '/Induction Machine'], 'Inertia', '0.1');
set_param([model '/Induction Machine'], 'PolePairs', '2');
% Connect the blocks using the correct port numbers
add_line(model, 'Input Voltage/1', 'Induction Machine/1');
add_line(model, 'Induction Machine/1', 'Scope/1');
% Save and open the model to make sure it's ready to be run
save_system(model);
open_system(model);
% Set simulation parameters
set_param(model, 'StopTime', '10');
set_param(model, 'Solver', 'ode45', 'FixedStep', 'auto');
% Configure the Step block to simulate a change in input voltage
set_param([model '/Input Voltage'], 'Time', '1', 'Before', '0', 'After', '1');
% Run the simulation
simOut = sim(model);
% Extract and plot data from the scope
scopeData = get(simOut, 'ScopeData');
time = scopeData.time;
values = scopeData.signals.values;
% Plotting the results
figure;
plot(time, values);
title('Torque vs Time');
xlabel('Time (s)');
ylabel('Torque (Nm)');

Categorías

Productos

Preguntada:

el 28 de Oct. de 2017

Respondida:

el 20 de Abr. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by