Author: PuTI
Stopping Sobolan Malware with Aqua Runtime Protection
Aqua Nautilus researchers have discovered a new attack campaign targeting interactive computing environments such as Jupyter
Notebooks
. The attack consists of multiple stages, beginning with the download of a compressed file from a remote server. Once executed, the attacker deploys several malicious tools to exploit the server and establish persistence. This campaign poses a significant risk to cloud-native environments, as it enables unauthorized access and long-term control over compromised systems.
Aqua Nautilus researchers have discovered a new attack campaign targeting interactive computing environments such as Jupyter Notebooks. The attack consists of multiple stages, beginning with the download of a compressed file from a remote server. Once executed, the attacker deploys several malicious tools to exploit the server and establish persistence. This campaign poses a significant risk to cloud-native environments, as it enables unauthorized access and long-term control over compromised systems.
Read More
How to create a fixed user who receives GNSS signals within a map made from 3D plot?
https://kr.mathworks.com/help/nav/ug/simulate-gnss-multipath-effects-on-uav-flying-in-urban-environment.html
I would like to refer to the example of matlab above to create a user who is statically fixed in the middle of the map, not a user who moves along the trajectory.
So I modified it a little bit and wrote the code, and when I run it, the figure comes out well, but there’s an unknown error, so I need some help.
Error using fusion.internal.GPSSensorBase/validateInputsImpl (line 302)
Expected input to be an array with number of columns equal to 3.
Error in deepseek_v01 (line 31)
[lla, velocity] = gps(position, zeros(1,3));
^^^^^^^^^^^^^^^^^^^^^^^^^
I’m getting this error, and I’m curious about the solution. I’m also curious if there’s any problem even if I ignore the error and use it.
The .osm file I use is not attached, so you can use the .osm file that Matlab supports by default.
referenceLocation = [37.498759 127.027487 0];
scene = uavScenario(‘ReferenceLocation’, referenceLocation, ‘UpdateRate’, 10, ‘StopTime’, Inf);
buildingColor = [0.8 0.8 0.8];
if isfile(‘gangnam_11exit.osm’)
addMesh(scene, ‘buildings’, {‘gangnam_11exit.osm’, [-250 250], [-250 250], ‘auto’}, buildingColor);
else
addMesh(scene, ‘buildings’, {‘random’, [-150 150], [-150 150], [10 50]}, buildingColor);
end
user = uavPlatform(‘User’, scene, ‘ReferenceFrame’, ‘ENU’, ‘InitialPosition’, [0 0 80]);
gps = gpsSensor(‘UpdateRate’, 10, …
‘ReferenceLocation’, referenceLocation, …
‘HorizontalPositionAccuracy’, 1.6, …
‘VerticalPositionAccuracy’, 3.0, …
‘VelocityAccuracy’, 0.1);
fig = figure(‘Name’,’Static GNSS User’);
ax = show3D(scene);
hold(ax, ‘on’);
axis(ax, ‘equal’);
grid(ax, ‘on’);
view(ax, 3);
plot3(ax, 0, 0, 80, ‘ro’, ‘MarkerSize’, 12, ‘MarkerFaceColor’, ‘r’);
setup(scene);
while ishandle(fig)
[position, orientation] = user.read();
[lla, velocity] = gps(position, zeros(1,3));
fprintf(‘[ENU Position] X: %.2fm, Y: %.2fm, Z: %.2fmn’, position(1), position(2), position(3));
fprintf(‘[GPS Coordinates] Lat: %.6f°, Lon: %.6f°, Alt: %.2fmnn’, lla(1), lla(2), lla(3));
show3D(scene, ‘Parent’, ax, ‘FastUpdate’, true);
drawnow limitrate;
advance(scene);
endhttps://kr.mathworks.com/help/nav/ug/simulate-gnss-multipath-effects-on-uav-flying-in-urban-environment.html
I would like to refer to the example of matlab above to create a user who is statically fixed in the middle of the map, not a user who moves along the trajectory.
So I modified it a little bit and wrote the code, and when I run it, the figure comes out well, but there’s an unknown error, so I need some help.
Error using fusion.internal.GPSSensorBase/validateInputsImpl (line 302)
Expected input to be an array with number of columns equal to 3.
Error in deepseek_v01 (line 31)
[lla, velocity] = gps(position, zeros(1,3));
^^^^^^^^^^^^^^^^^^^^^^^^^
I’m getting this error, and I’m curious about the solution. I’m also curious if there’s any problem even if I ignore the error and use it.
The .osm file I use is not attached, so you can use the .osm file that Matlab supports by default.
referenceLocation = [37.498759 127.027487 0];
scene = uavScenario(‘ReferenceLocation’, referenceLocation, ‘UpdateRate’, 10, ‘StopTime’, Inf);
buildingColor = [0.8 0.8 0.8];
if isfile(‘gangnam_11exit.osm’)
addMesh(scene, ‘buildings’, {‘gangnam_11exit.osm’, [-250 250], [-250 250], ‘auto’}, buildingColor);
else
addMesh(scene, ‘buildings’, {‘random’, [-150 150], [-150 150], [10 50]}, buildingColor);
end
user = uavPlatform(‘User’, scene, ‘ReferenceFrame’, ‘ENU’, ‘InitialPosition’, [0 0 80]);
gps = gpsSensor(‘UpdateRate’, 10, …
‘ReferenceLocation’, referenceLocation, …
‘HorizontalPositionAccuracy’, 1.6, …
‘VerticalPositionAccuracy’, 3.0, …
‘VelocityAccuracy’, 0.1);
fig = figure(‘Name’,’Static GNSS User’);
ax = show3D(scene);
hold(ax, ‘on’);
axis(ax, ‘equal’);
grid(ax, ‘on’);
view(ax, 3);
plot3(ax, 0, 0, 80, ‘ro’, ‘MarkerSize’, 12, ‘MarkerFaceColor’, ‘r’);
setup(scene);
while ishandle(fig)
[position, orientation] = user.read();
[lla, velocity] = gps(position, zeros(1,3));
fprintf(‘[ENU Position] X: %.2fm, Y: %.2fm, Z: %.2fmn’, position(1), position(2), position(3));
fprintf(‘[GPS Coordinates] Lat: %.6f°, Lon: %.6f°, Alt: %.2fmnn’, lla(1), lla(2), lla(3));
show3D(scene, ‘Parent’, ax, ‘FastUpdate’, true);
drawnow limitrate;
advance(scene);
end https://kr.mathworks.com/help/nav/ug/simulate-gnss-multipath-effects-on-uav-flying-in-urban-environment.html
I would like to refer to the example of matlab above to create a user who is statically fixed in the middle of the map, not a user who moves along the trajectory.
So I modified it a little bit and wrote the code, and when I run it, the figure comes out well, but there’s an unknown error, so I need some help.
Error using fusion.internal.GPSSensorBase/validateInputsImpl (line 302)
Expected input to be an array with number of columns equal to 3.
Error in deepseek_v01 (line 31)
[lla, velocity] = gps(position, zeros(1,3));
^^^^^^^^^^^^^^^^^^^^^^^^^
I’m getting this error, and I’m curious about the solution. I’m also curious if there’s any problem even if I ignore the error and use it.
The .osm file I use is not attached, so you can use the .osm file that Matlab supports by default.
referenceLocation = [37.498759 127.027487 0];
scene = uavScenario(‘ReferenceLocation’, referenceLocation, ‘UpdateRate’, 10, ‘StopTime’, Inf);
buildingColor = [0.8 0.8 0.8];
if isfile(‘gangnam_11exit.osm’)
addMesh(scene, ‘buildings’, {‘gangnam_11exit.osm’, [-250 250], [-250 250], ‘auto’}, buildingColor);
else
addMesh(scene, ‘buildings’, {‘random’, [-150 150], [-150 150], [10 50]}, buildingColor);
end
user = uavPlatform(‘User’, scene, ‘ReferenceFrame’, ‘ENU’, ‘InitialPosition’, [0 0 80]);
gps = gpsSensor(‘UpdateRate’, 10, …
‘ReferenceLocation’, referenceLocation, …
‘HorizontalPositionAccuracy’, 1.6, …
‘VerticalPositionAccuracy’, 3.0, …
‘VelocityAccuracy’, 0.1);
fig = figure(‘Name’,’Static GNSS User’);
ax = show3D(scene);
hold(ax, ‘on’);
axis(ax, ‘equal’);
grid(ax, ‘on’);
view(ax, 3);
plot3(ax, 0, 0, 80, ‘ro’, ‘MarkerSize’, 12, ‘MarkerFaceColor’, ‘r’);
setup(scene);
while ishandle(fig)
[position, orientation] = user.read();
[lla, velocity] = gps(position, zeros(1,3));
fprintf(‘[ENU Position] X: %.2fm, Y: %.2fm, Z: %.2fmn’, position(1), position(2), position(3));
fprintf(‘[GPS Coordinates] Lat: %.6f°, Lon: %.6f°, Alt: %.2fmnn’, lla(1), lla(2), lla(3));
show3D(scene, ‘Parent’, ax, ‘FastUpdate’, true);
drawnow limitrate;
advance(scene);
end matlab, gnss, gps, optimization, error MATLAB Answers — New Questions
MPU6050 Arduino Uno Simulink
I have a code to get the MPU6050 working using Matlab, but now I would like to run it on Simulink, but I keep hitting dead ends. Here is my Matlab code if anyone out there can help me:
%% setup
a=arduino;
mpu=i2cdev(a,’0x68′);
writeRegister(mpu, hex2dec(‘B6′), hex2dec(’00’), ‘int16’); %reset
data=zeros(10000,14,’int8′); %prelocating
j=1;
%% loop
while(true)
x=1;
for i=59:72 % 14 Data Registers for Accel,Temp,Gyro
data(j,x)= readRegister(mpu, i, ‘int8’);
x=x+1;
end
y=swapbytes(typecast(data(j,:), ‘int16’));
acc_x(j)=double(y(1));
acc_y(j)=double(y(2));
acc_z(j)=double(y(3));
j=j+1;
end
How can I write this in SIMULINK?
The loop is the easy part, I can just put it into a Matlab function block (except for readRegister)… I just can’t figure out the setup part in Simulink at all. I have tryed using the I2C Read block, but to no avail. Please help. And before you ask, I do have both the Arduino packages installed (for Matlab, and Simulink).
Again Please HELP!!!I have a code to get the MPU6050 working using Matlab, but now I would like to run it on Simulink, but I keep hitting dead ends. Here is my Matlab code if anyone out there can help me:
%% setup
a=arduino;
mpu=i2cdev(a,’0x68′);
writeRegister(mpu, hex2dec(‘B6′), hex2dec(’00’), ‘int16’); %reset
data=zeros(10000,14,’int8′); %prelocating
j=1;
%% loop
while(true)
x=1;
for i=59:72 % 14 Data Registers for Accel,Temp,Gyro
data(j,x)= readRegister(mpu, i, ‘int8’);
x=x+1;
end
y=swapbytes(typecast(data(j,:), ‘int16’));
acc_x(j)=double(y(1));
acc_y(j)=double(y(2));
acc_z(j)=double(y(3));
j=j+1;
end
How can I write this in SIMULINK?
The loop is the easy part, I can just put it into a Matlab function block (except for readRegister)… I just can’t figure out the setup part in Simulink at all. I have tryed using the I2C Read block, but to no avail. Please help. And before you ask, I do have both the Arduino packages installed (for Matlab, and Simulink).
Again Please HELP!!! I have a code to get the MPU6050 working using Matlab, but now I would like to run it on Simulink, but I keep hitting dead ends. Here is my Matlab code if anyone out there can help me:
%% setup
a=arduino;
mpu=i2cdev(a,’0x68′);
writeRegister(mpu, hex2dec(‘B6′), hex2dec(’00’), ‘int16’); %reset
data=zeros(10000,14,’int8′); %prelocating
j=1;
%% loop
while(true)
x=1;
for i=59:72 % 14 Data Registers for Accel,Temp,Gyro
data(j,x)= readRegister(mpu, i, ‘int8’);
x=x+1;
end
y=swapbytes(typecast(data(j,:), ‘int16’));
acc_x(j)=double(y(1));
acc_y(j)=double(y(2));
acc_z(j)=double(y(3));
j=j+1;
end
How can I write this in SIMULINK?
The loop is the easy part, I can just put it into a Matlab function block (except for readRegister)… I just can’t figure out the setup part in Simulink at all. I have tryed using the I2C Read block, but to no avail. Please help. And before you ask, I do have both the Arduino packages installed (for Matlab, and Simulink).
Again Please HELP!!! mpu, mpu6050, accelerometer, arduino, uno, arduino uno, simulink, matlab, gyroscope, readregister, writeregister, i2c, i2cdev MATLAB Answers — New Questions
Is it really a license violation to effectively make MATLAB free idle licenses in less then 4 hours?
This question originates from a reply in the following: thread.
I once wrote a python script that would try to get a floating license every 10 secs. From that idea now I thought maybe I can do similar one that would identify if MATLAB is idle more than 5 minutes or so, and then it would terminate the MATLAB.
Would this be a license violation, or is it just strictly altering the Network License Manager to timeout in less than 4 hours?This question originates from a reply in the following: thread.
I once wrote a python script that would try to get a floating license every 10 secs. From that idea now I thought maybe I can do similar one that would identify if MATLAB is idle more than 5 minutes or so, and then it would terminate the MATLAB.
Would this be a license violation, or is it just strictly altering the Network License Manager to timeout in less than 4 hours? This question originates from a reply in the following: thread.
I once wrote a python script that would try to get a floating license every 10 secs. From that idea now I thought maybe I can do similar one that would identify if MATLAB is idle more than 5 minutes or so, and then it would terminate the MATLAB.
Would this be a license violation, or is it just strictly altering the Network License Manager to timeout in less than 4 hours? network license manager, license MATLAB Answers — New Questions
Plot not showing all results
I need my graph to show the results from all lengths (i.e. all 5 coloured lines) but am only outputting 2 lines for one of the graphs. Both my code and the graphs are below. Please help.
clc; clear; close all;
%% Section 1: Development of Applied Thermal and Solute Concentration Fields
L_values = linspace(0.03, 0.25, 5); % Separation distance [m] (5 samples for clarity)
Nx = 200; % Number of spatial steps
Nt = 5000; % Number of time steps
dt = 0.005; % Time step size
% Thermal diffusivity values for aluminum alloy (m^2/s)
alpha_L = 3.26e-5; % Liquid phase
alpha_S = 6.58e-5; % Solid phase
% Solute diffusivity in liquid (m^2/s)
D_L = 1e-11;
% Interface velocity range
V = linspace(1.67e-5, 1.67e-4, 20); % Velocity range in m/s
% Partition coefficient & solute parameters
k = 0.85; % Partition coefficient
c0 = 7.26; % Initial solute concentration (wt% Al)
m = -3; % Liquidus slope (K/wt% Al)
[G_range, V_mesh] = meshgrid(linspace(1e4, 1e6, 20), V);
delta_c = sqrt(D_L ./ V_mesh); % Solute boundary layer thickness
G_critical = -2 * m * c0 ./ delta_c; % Constitutional gradient
%% Section 2: Initialize Figures
figure(1); hold on; % Temperature distribution plot
figure(2); hold on; % Solute concentration plot
%% Section 3: Loop Over Different L Values
for L = L_values
dx = L / Nx; % Spatial step size
x = linspace(0, L, Nx); % Position array
s = 0.02; % Initial interface position
% Initialize temperature profile
T = zeros(Nx, 1);
T(1:Nx/2) = linspace(1450, 1350, Nx/2); % Melt zone
T(Nx/2+1:end) = linspace(1150, 900, Nx/2); % Cold zone
%% Section 4: Applied Thermal Gradient (Finite Difference)
for t = 1:Nt
T_new = T;
for i = 2:Nx-1
if x(i) < s
T_new(i) = T(i) + alpha_S * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
else
T_new(i) = T(i) + alpha_L * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
end
end
T = T_new;
s = s + V(1) * dt; % Update interface position
end
%% Section 5: Plot Results for Each L
figure(1); % ensuring we’re plotting on the right figure
plot(x, T, ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
figure(2);
plot(x, linspace(c0, c0 * k, Nx), ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
end
%% Section 6: Finalize Temperature Plot
figure(1);
xlabel(‘Position (m)’); ylabel(‘Temperature (C)’);
title(‘Temperature Distribution for Different L Values’);
grid on; legend show; hold off;
%% Section 7: Finalize Solute Concentration Plot
figure(2);
xlabel(‘Position (m)’); ylabel(‘Solute Concentration (wt%)’);
title(‘Solute Concentration Distribution for Different L Values’);
grid on; legend show; hold off;I need my graph to show the results from all lengths (i.e. all 5 coloured lines) but am only outputting 2 lines for one of the graphs. Both my code and the graphs are below. Please help.
clc; clear; close all;
%% Section 1: Development of Applied Thermal and Solute Concentration Fields
L_values = linspace(0.03, 0.25, 5); % Separation distance [m] (5 samples for clarity)
Nx = 200; % Number of spatial steps
Nt = 5000; % Number of time steps
dt = 0.005; % Time step size
% Thermal diffusivity values for aluminum alloy (m^2/s)
alpha_L = 3.26e-5; % Liquid phase
alpha_S = 6.58e-5; % Solid phase
% Solute diffusivity in liquid (m^2/s)
D_L = 1e-11;
% Interface velocity range
V = linspace(1.67e-5, 1.67e-4, 20); % Velocity range in m/s
% Partition coefficient & solute parameters
k = 0.85; % Partition coefficient
c0 = 7.26; % Initial solute concentration (wt% Al)
m = -3; % Liquidus slope (K/wt% Al)
[G_range, V_mesh] = meshgrid(linspace(1e4, 1e6, 20), V);
delta_c = sqrt(D_L ./ V_mesh); % Solute boundary layer thickness
G_critical = -2 * m * c0 ./ delta_c; % Constitutional gradient
%% Section 2: Initialize Figures
figure(1); hold on; % Temperature distribution plot
figure(2); hold on; % Solute concentration plot
%% Section 3: Loop Over Different L Values
for L = L_values
dx = L / Nx; % Spatial step size
x = linspace(0, L, Nx); % Position array
s = 0.02; % Initial interface position
% Initialize temperature profile
T = zeros(Nx, 1);
T(1:Nx/2) = linspace(1450, 1350, Nx/2); % Melt zone
T(Nx/2+1:end) = linspace(1150, 900, Nx/2); % Cold zone
%% Section 4: Applied Thermal Gradient (Finite Difference)
for t = 1:Nt
T_new = T;
for i = 2:Nx-1
if x(i) < s
T_new(i) = T(i) + alpha_S * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
else
T_new(i) = T(i) + alpha_L * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
end
end
T = T_new;
s = s + V(1) * dt; % Update interface position
end
%% Section 5: Plot Results for Each L
figure(1); % ensuring we’re plotting on the right figure
plot(x, T, ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
figure(2);
plot(x, linspace(c0, c0 * k, Nx), ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
end
%% Section 6: Finalize Temperature Plot
figure(1);
xlabel(‘Position (m)’); ylabel(‘Temperature (C)’);
title(‘Temperature Distribution for Different L Values’);
grid on; legend show; hold off;
%% Section 7: Finalize Solute Concentration Plot
figure(2);
xlabel(‘Position (m)’); ylabel(‘Solute Concentration (wt%)’);
title(‘Solute Concentration Distribution for Different L Values’);
grid on; legend show; hold off; I need my graph to show the results from all lengths (i.e. all 5 coloured lines) but am only outputting 2 lines for one of the graphs. Both my code and the graphs are below. Please help.
clc; clear; close all;
%% Section 1: Development of Applied Thermal and Solute Concentration Fields
L_values = linspace(0.03, 0.25, 5); % Separation distance [m] (5 samples for clarity)
Nx = 200; % Number of spatial steps
Nt = 5000; % Number of time steps
dt = 0.005; % Time step size
% Thermal diffusivity values for aluminum alloy (m^2/s)
alpha_L = 3.26e-5; % Liquid phase
alpha_S = 6.58e-5; % Solid phase
% Solute diffusivity in liquid (m^2/s)
D_L = 1e-11;
% Interface velocity range
V = linspace(1.67e-5, 1.67e-4, 20); % Velocity range in m/s
% Partition coefficient & solute parameters
k = 0.85; % Partition coefficient
c0 = 7.26; % Initial solute concentration (wt% Al)
m = -3; % Liquidus slope (K/wt% Al)
[G_range, V_mesh] = meshgrid(linspace(1e4, 1e6, 20), V);
delta_c = sqrt(D_L ./ V_mesh); % Solute boundary layer thickness
G_critical = -2 * m * c0 ./ delta_c; % Constitutional gradient
%% Section 2: Initialize Figures
figure(1); hold on; % Temperature distribution plot
figure(2); hold on; % Solute concentration plot
%% Section 3: Loop Over Different L Values
for L = L_values
dx = L / Nx; % Spatial step size
x = linspace(0, L, Nx); % Position array
s = 0.02; % Initial interface position
% Initialize temperature profile
T = zeros(Nx, 1);
T(1:Nx/2) = linspace(1450, 1350, Nx/2); % Melt zone
T(Nx/2+1:end) = linspace(1150, 900, Nx/2); % Cold zone
%% Section 4: Applied Thermal Gradient (Finite Difference)
for t = 1:Nt
T_new = T;
for i = 2:Nx-1
if x(i) < s
T_new(i) = T(i) + alpha_S * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
else
T_new(i) = T(i) + alpha_L * dt / dx^2 * (T(i+1) – 2*T(i) + T(i-1));
end
end
T = T_new;
s = s + V(1) * dt; % Update interface position
end
%% Section 5: Plot Results for Each L
figure(1); % ensuring we’re plotting on the right figure
plot(x, T, ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
figure(2);
plot(x, linspace(c0, c0 * k, Nx), ‘LineWidth’, 2, ‘DisplayName’, sprintf(‘L = %.2f m’, L));
end
%% Section 6: Finalize Temperature Plot
figure(1);
xlabel(‘Position (m)’); ylabel(‘Temperature (C)’);
title(‘Temperature Distribution for Different L Values’);
grid on; legend show; hold off;
%% Section 7: Finalize Solute Concentration Plot
figure(2);
xlabel(‘Position (m)’); ylabel(‘Solute Concentration (wt%)’);
title(‘Solute Concentration Distribution for Different L Values’);
grid on; legend show; hold off; graphs MATLAB Answers — New Questions
Making Enter trigger a button in a .mlapp dialog
I am using the multi-window app facility (documented here) to create a dialog box a little fancier than the ones intrinsically provided. It provides an edit field in which the user may type a file name. I would like to arrange it so that if the user presses Enter after typing the file name, it triggers the Load button. I find that, if the keyboard focus is in the dialog generally, a KeyPressFcn callback for that dialog will be triggered. But if the keyboard focus is in a specific edit field, it won’t. But that is precisely what I want! Is there a way?
function createComponents(app)
% Create MainDialog and hide until all components are created
app.MainDialog = uifigure(‘Visible’, ‘off’);
app.MainDialog.Position = [100 100 879 218];
app.MainDialog.Name = ‘MATLAB App’;
app.MainDialog.KeyPressFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
% Create TitleLabel
app.TitleLabel = uilabel(app.MainDialog);
app.TitleLabel.HorizontalAlignment = ‘center’;
app.TitleLabel.FontSize = 24;
app.TitleLabel.Position = [364 164 154 32];
app.TitleLabel.Text = ‘Load Settings’;
% Create FileLabel
app.FileLabel = uilabel(app.MainDialog);
app.FileLabel.HorizontalAlignment = ‘right’;
app.FileLabel.Position = [68 102 27 22];
app.FileLabel.Text = ‘File:’;
% Create FileEditField
app.FileEditField = uieditfield(app.MainDialog, ‘text’);
app.FileEditField.Position = [110 102 622 22];
% Create LoadSaveButton
app.LoadSaveButton = uibutton(app.MainDialog, ‘push’);
app.LoadSaveButton.ButtonPushedFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
app.LoadSaveButton.FontSize = 18;
app.LoadSaveButton.Position = [694 27 110 38];
app.LoadSaveButton.Text = ‘Load’;
% Create BrowseButton
app.BrowseButton = uibutton(app.MainDialog, ‘push’);
app.BrowseButton.ButtonPushedFcn = createCallbackFcn(app, @BrowseButtonPushed, true);
app.BrowseButton.Position = [763 102 100 23];
app.BrowseButton.Text = ‘Browse…’;
% Create CancelButton
app.CancelButton = uibutton(app.MainDialog, ‘push’);
app.CancelButton.ButtonPushedFcn = createCallbackFcn(app, @CancelButtonPushed, true);
app.CancelButton.FontSize = 18;
app.CancelButton.Position = [94 27 110 38];
app.CancelButton.Text = ‘Cancel’;
% Show the figure after all components are created
app.MainDialog.Visible = ‘on’;
endI am using the multi-window app facility (documented here) to create a dialog box a little fancier than the ones intrinsically provided. It provides an edit field in which the user may type a file name. I would like to arrange it so that if the user presses Enter after typing the file name, it triggers the Load button. I find that, if the keyboard focus is in the dialog generally, a KeyPressFcn callback for that dialog will be triggered. But if the keyboard focus is in a specific edit field, it won’t. But that is precisely what I want! Is there a way?
function createComponents(app)
% Create MainDialog and hide until all components are created
app.MainDialog = uifigure(‘Visible’, ‘off’);
app.MainDialog.Position = [100 100 879 218];
app.MainDialog.Name = ‘MATLAB App’;
app.MainDialog.KeyPressFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
% Create TitleLabel
app.TitleLabel = uilabel(app.MainDialog);
app.TitleLabel.HorizontalAlignment = ‘center’;
app.TitleLabel.FontSize = 24;
app.TitleLabel.Position = [364 164 154 32];
app.TitleLabel.Text = ‘Load Settings’;
% Create FileLabel
app.FileLabel = uilabel(app.MainDialog);
app.FileLabel.HorizontalAlignment = ‘right’;
app.FileLabel.Position = [68 102 27 22];
app.FileLabel.Text = ‘File:’;
% Create FileEditField
app.FileEditField = uieditfield(app.MainDialog, ‘text’);
app.FileEditField.Position = [110 102 622 22];
% Create LoadSaveButton
app.LoadSaveButton = uibutton(app.MainDialog, ‘push’);
app.LoadSaveButton.ButtonPushedFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
app.LoadSaveButton.FontSize = 18;
app.LoadSaveButton.Position = [694 27 110 38];
app.LoadSaveButton.Text = ‘Load’;
% Create BrowseButton
app.BrowseButton = uibutton(app.MainDialog, ‘push’);
app.BrowseButton.ButtonPushedFcn = createCallbackFcn(app, @BrowseButtonPushed, true);
app.BrowseButton.Position = [763 102 100 23];
app.BrowseButton.Text = ‘Browse…’;
% Create CancelButton
app.CancelButton = uibutton(app.MainDialog, ‘push’);
app.CancelButton.ButtonPushedFcn = createCallbackFcn(app, @CancelButtonPushed, true);
app.CancelButton.FontSize = 18;
app.CancelButton.Position = [94 27 110 38];
app.CancelButton.Text = ‘Cancel’;
% Show the figure after all components are created
app.MainDialog.Visible = ‘on’;
end I am using the multi-window app facility (documented here) to create a dialog box a little fancier than the ones intrinsically provided. It provides an edit field in which the user may type a file name. I would like to arrange it so that if the user presses Enter after typing the file name, it triggers the Load button. I find that, if the keyboard focus is in the dialog generally, a KeyPressFcn callback for that dialog will be triggered. But if the keyboard focus is in a specific edit field, it won’t. But that is precisely what I want! Is there a way?
function createComponents(app)
% Create MainDialog and hide until all components are created
app.MainDialog = uifigure(‘Visible’, ‘off’);
app.MainDialog.Position = [100 100 879 218];
app.MainDialog.Name = ‘MATLAB App’;
app.MainDialog.KeyPressFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
% Create TitleLabel
app.TitleLabel = uilabel(app.MainDialog);
app.TitleLabel.HorizontalAlignment = ‘center’;
app.TitleLabel.FontSize = 24;
app.TitleLabel.Position = [364 164 154 32];
app.TitleLabel.Text = ‘Load Settings’;
% Create FileLabel
app.FileLabel = uilabel(app.MainDialog);
app.FileLabel.HorizontalAlignment = ‘right’;
app.FileLabel.Position = [68 102 27 22];
app.FileLabel.Text = ‘File:’;
% Create FileEditField
app.FileEditField = uieditfield(app.MainDialog, ‘text’);
app.FileEditField.Position = [110 102 622 22];
% Create LoadSaveButton
app.LoadSaveButton = uibutton(app.MainDialog, ‘push’);
app.LoadSaveButton.ButtonPushedFcn = createCallbackFcn(app, @LoadSaveButtonPushed, true);
app.LoadSaveButton.FontSize = 18;
app.LoadSaveButton.Position = [694 27 110 38];
app.LoadSaveButton.Text = ‘Load’;
% Create BrowseButton
app.BrowseButton = uibutton(app.MainDialog, ‘push’);
app.BrowseButton.ButtonPushedFcn = createCallbackFcn(app, @BrowseButtonPushed, true);
app.BrowseButton.Position = [763 102 100 23];
app.BrowseButton.Text = ‘Browse…’;
% Create CancelButton
app.CancelButton = uibutton(app.MainDialog, ‘push’);
app.CancelButton.ButtonPushedFcn = createCallbackFcn(app, @CancelButtonPushed, true);
app.CancelButton.FontSize = 18;
app.CancelButton.Position = [94 27 110 38];
app.CancelButton.Text = ‘Cancel’;
% Show the figure after all components are created
app.MainDialog.Visible = ‘on’;
end dialog MATLAB Answers — New Questions
IFFT results in wrong frequency
Hello,
I have a relatively simple code (see below).
What I don’t understand: It seem if I change the sampling frequency (Fs) or the signal length(L) the output of the IFFT seems to change (I used dummy values for this example) – can anyone explain to me why? So instead of 400 Hz it might show 360 Hz.
frequency =[0,400,900,2100]
FFT= [0 0; 100 -20;220 -2;50 4]
Fs = 90000
T = 1/Fs
L= 5000
t = (0:L-1)*T
X= zeros(1,L);
for (k=2:length(frequency))
X(round(frequency(k)*T*L)) = double(FFT(k,1))+i*double(FFT(k,2))
end
time= ifft(X, ‘symmetric’)*L/2Hello,
I have a relatively simple code (see below).
What I don’t understand: It seem if I change the sampling frequency (Fs) or the signal length(L) the output of the IFFT seems to change (I used dummy values for this example) – can anyone explain to me why? So instead of 400 Hz it might show 360 Hz.
frequency =[0,400,900,2100]
FFT= [0 0; 100 -20;220 -2;50 4]
Fs = 90000
T = 1/Fs
L= 5000
t = (0:L-1)*T
X= zeros(1,L);
for (k=2:length(frequency))
X(round(frequency(k)*T*L)) = double(FFT(k,1))+i*double(FFT(k,2))
end
time= ifft(X, ‘symmetric’)*L/2 Hello,
I have a relatively simple code (see below).
What I don’t understand: It seem if I change the sampling frequency (Fs) or the signal length(L) the output of the IFFT seems to change (I used dummy values for this example) – can anyone explain to me why? So instead of 400 Hz it might show 360 Hz.
frequency =[0,400,900,2100]
FFT= [0 0; 100 -20;220 -2;50 4]
Fs = 90000
T = 1/Fs
L= 5000
t = (0:L-1)*T
X= zeros(1,L);
for (k=2:length(frequency))
X(round(frequency(k)*T*L)) = double(FFT(k,1))+i*double(FFT(k,2))
end
time= ifft(X, ‘symmetric’)*L/2 fft MATLAB Answers — New Questions
I need help with solving the task in Simulink + Stateflow
Hello everyone. I have this task, does anyone have any ideas on how to do this or ready-made examples of something like this?
Need to make the model of specified below system and make software test.
System description
Input:
– only one input
– during all time input gets a series of data
– at each cycle input signal is either 0 or 1
– type boolean
Output:
– only one output
– at each cycle time, the system sets the output 0 or 1 that depends on
conditions
– the system sets the output to 1 if the sum of 1 in the last input
series was odd.
– in other cases, the system sets the output to 0
– type boolean
Definition of the series:
Series starts with 2 nd 1 in sequence (1 | 1).
Series ends after 2 nd 0 in sequence (0 0 |).
Example of input data and series:
input 0 1 0 1 | 1 1 1 0 0 |1 0 0 1| 1 1 1 0 1 0 0| 0 0
output 0 0 0 0 | 0 0 0 0 1 |1 1 1 1| 1 1 1 1 1 1 0| 0 0
Requirements to the software models:
* should be done in simulink and stateflow
* test example above should be included as test caseHello everyone. I have this task, does anyone have any ideas on how to do this or ready-made examples of something like this?
Need to make the model of specified below system and make software test.
System description
Input:
– only one input
– during all time input gets a series of data
– at each cycle input signal is either 0 or 1
– type boolean
Output:
– only one output
– at each cycle time, the system sets the output 0 or 1 that depends on
conditions
– the system sets the output to 1 if the sum of 1 in the last input
series was odd.
– in other cases, the system sets the output to 0
– type boolean
Definition of the series:
Series starts with 2 nd 1 in sequence (1 | 1).
Series ends after 2 nd 0 in sequence (0 0 |).
Example of input data and series:
input 0 1 0 1 | 1 1 1 0 0 |1 0 0 1| 1 1 1 0 1 0 0| 0 0
output 0 0 0 0 | 0 0 0 0 1 |1 1 1 1| 1 1 1 1 1 1 0| 0 0
Requirements to the software models:
* should be done in simulink and stateflow
* test example above should be included as test case Hello everyone. I have this task, does anyone have any ideas on how to do this or ready-made examples of something like this?
Need to make the model of specified below system and make software test.
System description
Input:
– only one input
– during all time input gets a series of data
– at each cycle input signal is either 0 or 1
– type boolean
Output:
– only one output
– at each cycle time, the system sets the output 0 or 1 that depends on
conditions
– the system sets the output to 1 if the sum of 1 in the last input
series was odd.
– in other cases, the system sets the output to 0
– type boolean
Definition of the series:
Series starts with 2 nd 1 in sequence (1 | 1).
Series ends after 2 nd 0 in sequence (0 0 |).
Example of input data and series:
input 0 1 0 1 | 1 1 1 0 0 |1 0 0 1| 1 1 1 0 1 0 0| 0 0
output 0 0 0 0 | 0 0 0 0 1 |1 1 1 1| 1 1 1 1 1 1 0| 0 0
Requirements to the software models:
* should be done in simulink and stateflow
* test example above should be included as test case simulink, stateflow MATLAB Answers — New Questions
csvwrite error: Undefined function ‘real’
I wrote a code to ask the user for information on the periodic table and put it into a struct. That all worked just fine. But I now need to write it to a cvs file and thats where it is not working.
Im getting the error: "Underfind function ‘real’ for input arguments of type ‘struct’".
The code where the error(s) are occuring
<</matlabcentral/answers/uploaded_files/112691/matlab.PNG>>
Im not too familiar with cvs. So am I not doing it right or am I hitting an error because of the way I wrote the code and how can I fix it?I wrote a code to ask the user for information on the periodic table and put it into a struct. That all worked just fine. But I now need to write it to a cvs file and thats where it is not working.
Im getting the error: "Underfind function ‘real’ for input arguments of type ‘struct’".
The code where the error(s) are occuring
<</matlabcentral/answers/uploaded_files/112691/matlab.PNG>>
Im not too familiar with cvs. So am I not doing it right or am I hitting an error because of the way I wrote the code and how can I fix it? I wrote a code to ask the user for information on the periodic table and put it into a struct. That all worked just fine. But I now need to write it to a cvs file and thats where it is not working.
Im getting the error: "Underfind function ‘real’ for input arguments of type ‘struct’".
The code where the error(s) are occuring
<</matlabcentral/answers/uploaded_files/112691/matlab.PNG>>
Im not too familiar with cvs. So am I not doing it right or am I hitting an error because of the way I wrote the code and how can I fix it? cvswrite MATLAB Answers — New Questions
Why are the states not executing properly in the Simulink function?
I am using three subsystems: one contains a Stateflow chart with states, and the other two contain Simulink functions, each with its own Stateflow block. I am using nested Simulink functions and calling them through Stateflow. However, the states are not executing properly inside the Simulink functions. Can anyone help me understand why this is happening and what might be causing it?
I have attached some snapshots and the .slx file for your reference and clarification.I am using three subsystems: one contains a Stateflow chart with states, and the other two contain Simulink functions, each with its own Stateflow block. I am using nested Simulink functions and calling them through Stateflow. However, the states are not executing properly inside the Simulink functions. Can anyone help me understand why this is happening and what might be causing it?
I have attached some snapshots and the .slx file for your reference and clarification. I am using three subsystems: one contains a Stateflow chart with states, and the other two contain Simulink functions, each with its own Stateflow block. I am using nested Simulink functions and calling them through Stateflow. However, the states are not executing properly inside the Simulink functions. Can anyone help me understand why this is happening and what might be causing it?
I have attached some snapshots and the .slx file for your reference and clarification. stateflow, simulink, function, simulink functions, matlab function MATLAB Answers — New Questions
How to display struct along filed?
step info of any transfer function is displayed like this,
S =
RiseTime: 6.2550e-06,
SettlingTime: 4.8543e-04,
Overshoot: 85.3868,
PeakTime: 2.0384e-05,
i want to display this whole information in msgbox as string or in static box in GUI.
Is there any way to display it in msgbox or static box ??
Please help.step info of any transfer function is displayed like this,
S =
RiseTime: 6.2550e-06,
SettlingTime: 4.8543e-04,
Overshoot: 85.3868,
PeakTime: 2.0384e-05,
i want to display this whole information in msgbox as string or in static box in GUI.
Is there any way to display it in msgbox or static box ??
Please help. step info of any transfer function is displayed like this,
S =
RiseTime: 6.2550e-06,
SettlingTime: 4.8543e-04,
Overshoot: 85.3868,
PeakTime: 2.0384e-05,
i want to display this whole information in msgbox as string or in static box in GUI.
Is there any way to display it in msgbox or static box ??
Please help. transfer function, struct, cell, table MATLAB Answers — New Questions
System File Checker (SFC) incorrectly flags Windows Defender PowerShell module files as corrupted – Microsoft Support
Discusses that System File Checker in Windows 10 incorrectly flags files that are part of the Windows Defender PowerShell module as corrupted or damaged.
MATLAB Error fitting Stable distribution to data – Help?
MATLAB returns an unknown error every time I try to fit the Stable distribution to a dataset. I haven’t encountered this error with previous datasets or MATLAB versions, but it has been 6 months since I’ve tried. This time I’ve used multiple data sets and confirmed that a Normal distribution will fit the datasets…but when I specify ‘Stable’ vice ‘Normal’, I get the following error:
"Unrecognized function or variable ‘getIpOptions’.
Error in fmincon (line 832)
options =
getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);"
This code runs:
load hospital; % get MATLAB dataset
z = hospital.Weight; % Assign data values
pd = fitdist(z,’Normal’);
However, this doesn’t and returns the above error:
pd2 = fitdist(z,’Stable’);
Is this a bug in the 2020a release?
I’m running:
>> version
ans = ‘9.8.0.1323502 (R2020a)’MATLAB returns an unknown error every time I try to fit the Stable distribution to a dataset. I haven’t encountered this error with previous datasets or MATLAB versions, but it has been 6 months since I’ve tried. This time I’ve used multiple data sets and confirmed that a Normal distribution will fit the datasets…but when I specify ‘Stable’ vice ‘Normal’, I get the following error:
"Unrecognized function or variable ‘getIpOptions’.
Error in fmincon (line 832)
options =
getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);"
This code runs:
load hospital; % get MATLAB dataset
z = hospital.Weight; % Assign data values
pd = fitdist(z,’Normal’);
However, this doesn’t and returns the above error:
pd2 = fitdist(z,’Stable’);
Is this a bug in the 2020a release?
I’m running:
>> version
ans = ‘9.8.0.1323502 (R2020a)’ MATLAB returns an unknown error every time I try to fit the Stable distribution to a dataset. I haven’t encountered this error with previous datasets or MATLAB versions, but it has been 6 months since I’ve tried. This time I’ve used multiple data sets and confirmed that a Normal distribution will fit the datasets…but when I specify ‘Stable’ vice ‘Normal’, I get the following error:
"Unrecognized function or variable ‘getIpOptions’.
Error in fmincon (line 832)
options =
getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);"
This code runs:
load hospital; % get MATLAB dataset
z = hospital.Weight; % Assign data values
pd = fitdist(z,’Normal’);
However, this doesn’t and returns the above error:
pd2 = fitdist(z,’Stable’);
Is this a bug in the 2020a release?
I’m running:
>> version
ans = ‘9.8.0.1323502 (R2020a)’ stable distribution, fitdist stable MATLAB Answers — New Questions
Derivative of state ‘1’ in block PV Array at time 0.0 is not finite error
im trying to charge a battery using a solar pv array and i keep getting the following error: An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state ‘1’ in block ‘ChargingBatteryUsingSolarPVArray/PV Array/Diode Rsh/Transfer Fcn’ at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
what am i not doing correctly?im trying to charge a battery using a solar pv array and i keep getting the following error: An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state ‘1’ in block ‘ChargingBatteryUsingSolarPVArray/PV Array/Diode Rsh/Transfer Fcn’ at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
what am i not doing correctly? im trying to charge a battery using a solar pv array and i keep getting the following error: An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state ‘1’ in block ‘ChargingBatteryUsingSolarPVArray/PV Array/Diode Rsh/Transfer Fcn’ at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
what am i not doing correctly? simulation, simulink, simpowersystems, power_electronics_control, matlab MATLAB Answers — New Questions
How can I use the function coeffs() as the input to the function tf()?
This code works to give me the root locus of my system, but I have to manually enter the coefficients
num = [1, 117/10, 24477/400, 5584/125, -2315137/40000, 36905889/40000, -66965649/160000, -921912043/80000, 34652192177/640000, -4796713113/25600, 62141795103/160000, -223688325847/320000, 32896376299/40000, -7904756769/10000, 708588777/2000, -52514891/800];
den = [1, -4/5, -5929/400, -14969/2000, 56007543/160000, -550116261/400000, 187999365153/64000000, -1333141873017/320000000, 1759926060179/400000000, -120268082137481/32000000000, 819503408996093/320000000000, -4388359670461129/3200000000000, 338687548373223/640000000000, -1907357941873611/12800000000000, 306186935180877/10240000000000, -4892378756049/1024000000000]
sys = tf(num,den);
rlocus(sys);
However, the following code is not working. I imagine that the output of coeffs() &/or fliplr() is not technically an array despite appearing so when I print the output.
syms s
n = (s^2+10*s+50)*(s^2+8.6*s+21.73)*(s^2-0.7*s+0.1625)*(s^2-2*s+3.25)^2*(s^2+4)^2*(s-2.2);
x = expand(n);
d = (s^2+8.6*s+26.33)*(s^2+0.3*s+0.6625)*(s^2+0.09)*(s^2-0.8*s+0.25)*(s^2-0.9*s+0.5625)*(s^2-2*s+2.69)*(s^2-4*s+4.0225)*(s-2);
y = expand(d);
num = coeffs(x);
num = fliplr(num)
den = coeffs(y);
den = fliplr(den)
sys = tf(num,den); %error line
figure(1)
rlocus(sys)
If someone could help me figure out how to modify the second chunk of code so that the transfer function is created that would be much appreaciated.This code works to give me the root locus of my system, but I have to manually enter the coefficients
num = [1, 117/10, 24477/400, 5584/125, -2315137/40000, 36905889/40000, -66965649/160000, -921912043/80000, 34652192177/640000, -4796713113/25600, 62141795103/160000, -223688325847/320000, 32896376299/40000, -7904756769/10000, 708588777/2000, -52514891/800];
den = [1, -4/5, -5929/400, -14969/2000, 56007543/160000, -550116261/400000, 187999365153/64000000, -1333141873017/320000000, 1759926060179/400000000, -120268082137481/32000000000, 819503408996093/320000000000, -4388359670461129/3200000000000, 338687548373223/640000000000, -1907357941873611/12800000000000, 306186935180877/10240000000000, -4892378756049/1024000000000]
sys = tf(num,den);
rlocus(sys);
However, the following code is not working. I imagine that the output of coeffs() &/or fliplr() is not technically an array despite appearing so when I print the output.
syms s
n = (s^2+10*s+50)*(s^2+8.6*s+21.73)*(s^2-0.7*s+0.1625)*(s^2-2*s+3.25)^2*(s^2+4)^2*(s-2.2);
x = expand(n);
d = (s^2+8.6*s+26.33)*(s^2+0.3*s+0.6625)*(s^2+0.09)*(s^2-0.8*s+0.25)*(s^2-0.9*s+0.5625)*(s^2-2*s+2.69)*(s^2-4*s+4.0225)*(s-2);
y = expand(d);
num = coeffs(x);
num = fliplr(num)
den = coeffs(y);
den = fliplr(den)
sys = tf(num,den); %error line
figure(1)
rlocus(sys)
If someone could help me figure out how to modify the second chunk of code so that the transfer function is created that would be much appreaciated. This code works to give me the root locus of my system, but I have to manually enter the coefficients
num = [1, 117/10, 24477/400, 5584/125, -2315137/40000, 36905889/40000, -66965649/160000, -921912043/80000, 34652192177/640000, -4796713113/25600, 62141795103/160000, -223688325847/320000, 32896376299/40000, -7904756769/10000, 708588777/2000, -52514891/800];
den = [1, -4/5, -5929/400, -14969/2000, 56007543/160000, -550116261/400000, 187999365153/64000000, -1333141873017/320000000, 1759926060179/400000000, -120268082137481/32000000000, 819503408996093/320000000000, -4388359670461129/3200000000000, 338687548373223/640000000000, -1907357941873611/12800000000000, 306186935180877/10240000000000, -4892378756049/1024000000000]
sys = tf(num,den);
rlocus(sys);
However, the following code is not working. I imagine that the output of coeffs() &/or fliplr() is not technically an array despite appearing so when I print the output.
syms s
n = (s^2+10*s+50)*(s^2+8.6*s+21.73)*(s^2-0.7*s+0.1625)*(s^2-2*s+3.25)^2*(s^2+4)^2*(s-2.2);
x = expand(n);
d = (s^2+8.6*s+26.33)*(s^2+0.3*s+0.6625)*(s^2+0.09)*(s^2-0.8*s+0.25)*(s^2-0.9*s+0.5625)*(s^2-2*s+2.69)*(s^2-4*s+4.0225)*(s-2);
y = expand(d);
num = coeffs(x);
num = fliplr(num)
den = coeffs(y);
den = fliplr(den)
sys = tf(num,den); %error line
figure(1)
rlocus(sys)
If someone could help me figure out how to modify the second chunk of code so that the transfer function is created that would be much appreaciated. coeff, tf, coeff(), tf() MATLAB Answers — New Questions
Why do I receive an error when running command “startworker” for the MATLAB Parallel Server?
I’ve installed MATLAB R2020b on a head node and multiple worker nodes. All run RHEL 7.8. I’ve confirmed that the MATLAB and parallel server licenses are correct and have no licensing errors. I’ve successfully started MJS service on the head and worker nodes and verified with "nodestatus" command. I successfully started a MJS job manager on the head node named "myMJS". When I start a worker via the command:
./startworker -jobmanagerhost <HEADNODE> -jobmanager <myMJS> -remotehost <WORKERNODE>
I get an error stating:
The mjs service on the host <WORKERNODE>
returned the following error:
Problem starting the MATLAB worker.
=============================================================
matlabExecutable must be of the form ‘<release string>=<path to executable>;<release string>=<path to executable>;’. Actual string:
Note, there is no "actual string" given in the error message as if no command is being passed.
What am I doing wrong or could troubleshoot the issue further?I’ve installed MATLAB R2020b on a head node and multiple worker nodes. All run RHEL 7.8. I’ve confirmed that the MATLAB and parallel server licenses are correct and have no licensing errors. I’ve successfully started MJS service on the head and worker nodes and verified with "nodestatus" command. I successfully started a MJS job manager on the head node named "myMJS". When I start a worker via the command:
./startworker -jobmanagerhost <HEADNODE> -jobmanager <myMJS> -remotehost <WORKERNODE>
I get an error stating:
The mjs service on the host <WORKERNODE>
returned the following error:
Problem starting the MATLAB worker.
=============================================================
matlabExecutable must be of the form ‘<release string>=<path to executable>;<release string>=<path to executable>;’. Actual string:
Note, there is no "actual string" given in the error message as if no command is being passed.
What am I doing wrong or could troubleshoot the issue further? I’ve installed MATLAB R2020b on a head node and multiple worker nodes. All run RHEL 7.8. I’ve confirmed that the MATLAB and parallel server licenses are correct and have no licensing errors. I’ve successfully started MJS service on the head and worker nodes and verified with "nodestatus" command. I successfully started a MJS job manager on the head node named "myMJS". When I start a worker via the command:
./startworker -jobmanagerhost <HEADNODE> -jobmanager <myMJS> -remotehost <WORKERNODE>
I get an error stating:
The mjs service on the host <WORKERNODE>
returned the following error:
Problem starting the MATLAB worker.
=============================================================
matlabExecutable must be of the form ‘<release string>=<path to executable>;<release string>=<path to executable>;’. Actual string:
Note, there is no "actual string" given in the error message as if no command is being passed.
What am I doing wrong or could troubleshoot the issue further? startworker, matlab parallel server, matlabexecutable MATLAB Answers — New Questions
set parameters read from outside a compiled simulink model at startup/initialization
Hi,
I have a Simulink Model I wish to compile into an executable which works fine except that I need to be able to set some parameters/variables at the start of the program or in the initialization phase.
So far, I have no hand-written code (.c or .h) files where I could add some lines.
What do I have to do and where would I place the code?
As of now, I’ve been using the following line to compile the simulink model:
mcc(‘-N’,’-p’,’icomm’, ‘-m’,’Reglerexe’,’-a’,[‘*’,ext],’-a’,[‘*’,ext_thunk{:}], ‘-d’, myDir)
Thanks in advance for your help!
SwantjeHi,
I have a Simulink Model I wish to compile into an executable which works fine except that I need to be able to set some parameters/variables at the start of the program or in the initialization phase.
So far, I have no hand-written code (.c or .h) files where I could add some lines.
What do I have to do and where would I place the code?
As of now, I’ve been using the following line to compile the simulink model:
mcc(‘-N’,’-p’,’icomm’, ‘-m’,’Reglerexe’,’-a’,[‘*’,ext],’-a’,[‘*’,ext_thunk{:}], ‘-d’, myDir)
Thanks in advance for your help!
Swantje Hi,
I have a Simulink Model I wish to compile into an executable which works fine except that I need to be able to set some parameters/variables at the start of the program or in the initialization phase.
So far, I have no hand-written code (.c or .h) files where I could add some lines.
What do I have to do and where would I place the code?
As of now, I’ve been using the following line to compile the simulink model:
mcc(‘-N’,’-p’,’icomm’, ‘-m’,’Reglerexe’,’-a’,[‘*’,ext],’-a’,[‘*’,ext_thunk{:}], ‘-d’, myDir)
Thanks in advance for your help!
Swantje reading parameters into an executable at startup MATLAB Answers — New Questions
addon installer says i dont own the addon still after changing accounts
Hi, i was using personal account with trial and then i changed to my schools academic license on matlab but i still can’t download stuff from addon installer and i have the addons on my license. It seems addon installer is not updated on my account because it is still showing me that i have 27 days of trial left. It is true for my personal account but not for my academic account.
update: a new installation fixed this problem.Hi, i was using personal account with trial and then i changed to my schools academic license on matlab but i still can’t download stuff from addon installer and i have the addons on my license. It seems addon installer is not updated on my account because it is still showing me that i have 27 days of trial left. It is true for my personal account but not for my academic account.
update: a new installation fixed this problem. Hi, i was using personal account with trial and then i changed to my schools academic license on matlab but i still can’t download stuff from addon installer and i have the addons on my license. It seems addon installer is not updated on my account because it is still showing me that i have 27 days of trial left. It is true for my personal account but not for my academic account.
update: a new installation fixed this problem. addons, account, license MATLAB Answers — New Questions
How to get values of pre-filled holes in dotx template
Hi,
I would like to import a template.dotx that contains holes, some being already pre-filled beforehand.
For instance: Imagine that a holeID "ahole1" that contains in the dotx a predefined value x, written when creating the dotx.
In the script, I would like to read the value of "ahole1" prior deciding what to write in a second hole "ahole2".
Pratical example:
dotx is created with "ahole1" value = 10 and "ahole2" is empty.
dotx is imported into matlab
If the value of "ahole1"> 12, a second hole "ahole2" will have appended into it "5"
I am using matlab 2024b and the report generator to import the dotx, but i cannot find the means to get the content of a Hole unless from the script level i append a value to it.Hi,
I would like to import a template.dotx that contains holes, some being already pre-filled beforehand.
For instance: Imagine that a holeID "ahole1" that contains in the dotx a predefined value x, written when creating the dotx.
In the script, I would like to read the value of "ahole1" prior deciding what to write in a second hole "ahole2".
Pratical example:
dotx is created with "ahole1" value = 10 and "ahole2" is empty.
dotx is imported into matlab
If the value of "ahole1"> 12, a second hole "ahole2" will have appended into it "5"
I am using matlab 2024b and the report generator to import the dotx, but i cannot find the means to get the content of a Hole unless from the script level i append a value to it. Hi,
I would like to import a template.dotx that contains holes, some being already pre-filled beforehand.
For instance: Imagine that a holeID "ahole1" that contains in the dotx a predefined value x, written when creating the dotx.
In the script, I would like to read the value of "ahole1" prior deciding what to write in a second hole "ahole2".
Pratical example:
dotx is created with "ahole1" value = 10 and "ahole2" is empty.
dotx is imported into matlab
If the value of "ahole1"> 12, a second hole "ahole2" will have appended into it "5"
I am using matlab 2024b and the report generator to import the dotx, but i cannot find the means to get the content of a Hole unless from the script level i append a value to it. dotx, pre-filled holes, hole value, dotx reporter generator MATLAB Answers — New Questions
I need help for drawing a constraint in Matlab in 2D
Dear All,
I’m trying to draw a set of constraints but I got a wrong line for the constraint 2×1<=3 !!!! I need a vertical line !! I approciate any help from you !!!
Many Thanks,
Nadia
clear;clc;close;
%max 5×1+7×2;
%3×1+8×2<=12;
%x1+x2<=2;
%2×1<=3;
%x2<=4;
%x1,x2>=0;
%% plot the feasible region %Generate data
[x1,x2] = meshgrid(0:0.1:10);% i changed 0.1 to 0.01 to plot the fourth constraint
NB=5*x1+7*x2;
% Get True where condition applies, false where not.
cond1=3*x1+8*x2<=12; cond2=x1+x2<=2; cond3=2*x1<=3; cond4=x2<=2;
% Get boundaries of the condition
p1=(12-3*x1(1,:))/8;
p2=2-x1(1,:);
p3=3/2-x1(1,:);
p4=2-x2(1,:);
%Delete Areas whereCondition does not apply;
NB(~cond1)=NaN; NB(~cond2)=NaN; NB(~cond3)=NaN; NB(~cond4)=NaN;
%% Plot
[x2,h]=contourf(x1,x2,NB,0); % command contourf for filling the area between the contour levels
hold on
plot(x1(1,:),p1,’r’,’LineWidth’,2); text(x1(1,20),p1(20), ‘leftarrow Cond1’); %arbitrary location
plot(x1(1,:),p2,’k’,’LineWidth’,2); text(x1(1,15),p2(15), ‘leftarrow Cond2’); %arbitrary location
plot(x1(1,:),p3,’b’,’LineWidth’,2); text(x1(1,20),p3(20), ‘leftarrow Cond3’); %arbitrary location
plot(x1(1,:),p4,’b’,’LineWidth’,2); text(x1(1,20),p4(20), ‘leftarrow Cond3’); %arbitrary location
axis([0 5 0 5])
xlabel(‘x1’)
ylabel(‘x2’)Dear All,
I’m trying to draw a set of constraints but I got a wrong line for the constraint 2×1<=3 !!!! I need a vertical line !! I approciate any help from you !!!
Many Thanks,
Nadia
clear;clc;close;
%max 5×1+7×2;
%3×1+8×2<=12;
%x1+x2<=2;
%2×1<=3;
%x2<=4;
%x1,x2>=0;
%% plot the feasible region %Generate data
[x1,x2] = meshgrid(0:0.1:10);% i changed 0.1 to 0.01 to plot the fourth constraint
NB=5*x1+7*x2;
% Get True where condition applies, false where not.
cond1=3*x1+8*x2<=12; cond2=x1+x2<=2; cond3=2*x1<=3; cond4=x2<=2;
% Get boundaries of the condition
p1=(12-3*x1(1,:))/8;
p2=2-x1(1,:);
p3=3/2-x1(1,:);
p4=2-x2(1,:);
%Delete Areas whereCondition does not apply;
NB(~cond1)=NaN; NB(~cond2)=NaN; NB(~cond3)=NaN; NB(~cond4)=NaN;
%% Plot
[x2,h]=contourf(x1,x2,NB,0); % command contourf for filling the area between the contour levels
hold on
plot(x1(1,:),p1,’r’,’LineWidth’,2); text(x1(1,20),p1(20), ‘leftarrow Cond1’); %arbitrary location
plot(x1(1,:),p2,’k’,’LineWidth’,2); text(x1(1,15),p2(15), ‘leftarrow Cond2’); %arbitrary location
plot(x1(1,:),p3,’b’,’LineWidth’,2); text(x1(1,20),p3(20), ‘leftarrow Cond3’); %arbitrary location
plot(x1(1,:),p4,’b’,’LineWidth’,2); text(x1(1,20),p4(20), ‘leftarrow Cond3’); %arbitrary location
axis([0 5 0 5])
xlabel(‘x1’)
ylabel(‘x2’) Dear All,
I’m trying to draw a set of constraints but I got a wrong line for the constraint 2×1<=3 !!!! I need a vertical line !! I approciate any help from you !!!
Many Thanks,
Nadia
clear;clc;close;
%max 5×1+7×2;
%3×1+8×2<=12;
%x1+x2<=2;
%2×1<=3;
%x2<=4;
%x1,x2>=0;
%% plot the feasible region %Generate data
[x1,x2] = meshgrid(0:0.1:10);% i changed 0.1 to 0.01 to plot the fourth constraint
NB=5*x1+7*x2;
% Get True where condition applies, false where not.
cond1=3*x1+8*x2<=12; cond2=x1+x2<=2; cond3=2*x1<=3; cond4=x2<=2;
% Get boundaries of the condition
p1=(12-3*x1(1,:))/8;
p2=2-x1(1,:);
p3=3/2-x1(1,:);
p4=2-x2(1,:);
%Delete Areas whereCondition does not apply;
NB(~cond1)=NaN; NB(~cond2)=NaN; NB(~cond3)=NaN; NB(~cond4)=NaN;
%% Plot
[x2,h]=contourf(x1,x2,NB,0); % command contourf for filling the area between the contour levels
hold on
plot(x1(1,:),p1,’r’,’LineWidth’,2); text(x1(1,20),p1(20), ‘leftarrow Cond1’); %arbitrary location
plot(x1(1,:),p2,’k’,’LineWidth’,2); text(x1(1,15),p2(15), ‘leftarrow Cond2’); %arbitrary location
plot(x1(1,:),p3,’b’,’LineWidth’,2); text(x1(1,20),p3(20), ‘leftarrow Cond3’); %arbitrary location
plot(x1(1,:),p4,’b’,’LineWidth’,2); text(x1(1,20),p4(20), ‘leftarrow Cond3’); %arbitrary location
axis([0 5 0 5])
xlabel(‘x1’)
ylabel(‘x2’) drawing a constraint, vertical line, matlab MATLAB Answers — New Questions