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

119 views (last 30 days)
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?

Accepted Answer

Kojiro Saito
Kojiro Saito on 28 Oct 2017
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 Comments
Dylan
Dylan on 3 Apr 2023
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
Dylan
Dylan on 3 Apr 2023
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.

Sign in to comment.

More Answers (1)

Zeeshan
Zeeshan on 20 Apr 2024
% 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)');

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!