Tag Archives: matlab
Failed to load a mesh from gptoolbox. I am missing something, what is it?
% 1. Load a Mesh
[V, F] = readOFF(‘D:Conferences and WorkshopsSG SummerMFC – Scodesgptoolbox-mastergptoolbox-mastermesh.off’);
% 2. Display the Mesh
figure;
trisurf(F, V(:,1), V(:,2), V(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘Original Mesh’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% Define the number of iterations and timestep for smoothing
num_iterations = 100;
time_step = 0.01;
% 3. Mean Curvature Flow (MCF) – Explicit Method
V_explicit = V; % Copy the vertices for the explicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator and mean curvature normal
L = cotmatrix(V_explicit, F);
HN = -L * V_explicit;
% Update vertex positions
V_explicit = V_explicit + time_step * HN;
end
% Display the smoothed mesh – Explicit Method
figure;
trisurf(F, V_explicit(:,1), V_explicit(:,2), V_explicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Explicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% 3. Mean Curvature Flow (MCF) – Semi-Implicit Method
V_implicit = V; % Copy the vertices for the implicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator
L = cotmatrix(V_implicit, F);
% Solve (I – time_step * L) * V_new = V_old
V_implicit = (speye(size(V_implicit, 1)) – time_step * L) V_implicit;
end
% Display the smoothed mesh – Semi-Implicit Method
figure;
trisurf(F, V_implicit(:,1), V_implicit(:,2), V_implicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Semi-Implicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
here is the link to loadmesh function: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/load_mesh.m
and the readOFF: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/readOFF.m% 1. Load a Mesh
[V, F] = readOFF(‘D:Conferences and WorkshopsSG SummerMFC – Scodesgptoolbox-mastergptoolbox-mastermesh.off’);
% 2. Display the Mesh
figure;
trisurf(F, V(:,1), V(:,2), V(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘Original Mesh’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% Define the number of iterations and timestep for smoothing
num_iterations = 100;
time_step = 0.01;
% 3. Mean Curvature Flow (MCF) – Explicit Method
V_explicit = V; % Copy the vertices for the explicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator and mean curvature normal
L = cotmatrix(V_explicit, F);
HN = -L * V_explicit;
% Update vertex positions
V_explicit = V_explicit + time_step * HN;
end
% Display the smoothed mesh – Explicit Method
figure;
trisurf(F, V_explicit(:,1), V_explicit(:,2), V_explicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Explicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% 3. Mean Curvature Flow (MCF) – Semi-Implicit Method
V_implicit = V; % Copy the vertices for the implicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator
L = cotmatrix(V_implicit, F);
% Solve (I – time_step * L) * V_new = V_old
V_implicit = (speye(size(V_implicit, 1)) – time_step * L) V_implicit;
end
% Display the smoothed mesh – Semi-Implicit Method
figure;
trisurf(F, V_implicit(:,1), V_implicit(:,2), V_implicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Semi-Implicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
here is the link to loadmesh function: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/load_mesh.m
and the readOFF: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/readOFF.m % 1. Load a Mesh
[V, F] = readOFF(‘D:Conferences and WorkshopsSG SummerMFC – Scodesgptoolbox-mastergptoolbox-mastermesh.off’);
% 2. Display the Mesh
figure;
trisurf(F, V(:,1), V(:,2), V(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘Original Mesh’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% Define the number of iterations and timestep for smoothing
num_iterations = 100;
time_step = 0.01;
% 3. Mean Curvature Flow (MCF) – Explicit Method
V_explicit = V; % Copy the vertices for the explicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator and mean curvature normal
L = cotmatrix(V_explicit, F);
HN = -L * V_explicit;
% Update vertex positions
V_explicit = V_explicit + time_step * HN;
end
% Display the smoothed mesh – Explicit Method
figure;
trisurf(F, V_explicit(:,1), V_explicit(:,2), V_explicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Explicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
% 3. Mean Curvature Flow (MCF) – Semi-Implicit Method
V_implicit = V; % Copy the vertices for the implicit method
for iter = 1:num_iterations
% Compute the Laplace-Beltrami operator
L = cotmatrix(V_implicit, F);
% Solve (I – time_step * L) * V_new = V_old
V_implicit = (speye(size(V_implicit, 1)) – time_step * L) V_implicit;
end
% Display the smoothed mesh – Semi-Implicit Method
figure;
trisurf(F, V_implicit(:,1), V_implicit(:,2), V_implicit(:,3), ‘FaceColor’, ‘cyan’, ‘EdgeColor’, ‘none’);
axis equal;
lighting gouraud;
camlight;
title(‘MCF – Semi-Implicit Method’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
here is the link to loadmesh function: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/load_mesh.m
and the readOFF: https://github.com/geometry-processing/gptoolbox/blob/master/mesh/readOFF.m gpu, gp, image processing, mesh MATLAB Answers — New Questions
Can’t connect branch with block in simulink
Hello.
I made a circuit for superposition theorem in simulink with dc voltage source and the measured current is connected to the scope as an output so i can see the value.My next task is to simulate the work of this circuit. When i try to drag & connect the branch with the input of the current measurement block then it is showing red dashed line which means that i cannot connect it to my circuit.
Please someone help me solve this problem, it is a bit urgent.
Thank you!Hello.
I made a circuit for superposition theorem in simulink with dc voltage source and the measured current is connected to the scope as an output so i can see the value.My next task is to simulate the work of this circuit. When i try to drag & connect the branch with the input of the current measurement block then it is showing red dashed line which means that i cannot connect it to my circuit.
Please someone help me solve this problem, it is a bit urgent.
Thank you! Hello.
I made a circuit for superposition theorem in simulink with dc voltage source and the measured current is connected to the scope as an output so i can see the value.My next task is to simulate the work of this circuit. When i try to drag & connect the branch with the input of the current measurement block then it is showing red dashed line which means that i cannot connect it to my circuit.
Please someone help me solve this problem, it is a bit urgent.
Thank you! superposition theorem, block connection MATLAB Answers — New Questions
Criteria for the final SINR, CQI computation in 5G NR CSI Reporting
In 5G toolbox, specifically NR Downlink CSI Reporting Example, SINR is being calculated for all layers. I have a question, for a two-layer scenario, if SINR values vary considerably, what should be the criteria for the final SINR, CQI computation? The lowest SINR, the mean or something between? In other words, which one of these criteria should we choose, as each comes with pros and cons.
Go with lowest SINR.
Go with higher SINR and rank1.
Go between lower SINR and average SINR.
ThanksIn 5G toolbox, specifically NR Downlink CSI Reporting Example, SINR is being calculated for all layers. I have a question, for a two-layer scenario, if SINR values vary considerably, what should be the criteria for the final SINR, CQI computation? The lowest SINR, the mean or something between? In other words, which one of these criteria should we choose, as each comes with pros and cons.
Go with lowest SINR.
Go with higher SINR and rank1.
Go between lower SINR and average SINR.
Thanks In 5G toolbox, specifically NR Downlink CSI Reporting Example, SINR is being calculated for all layers. I have a question, for a two-layer scenario, if SINR values vary considerably, what should be the criteria for the final SINR, CQI computation? The lowest SINR, the mean or something between? In other words, which one of these criteria should we choose, as each comes with pros and cons.
Go with lowest SINR.
Go with higher SINR and rank1.
Go between lower SINR and average SINR.
Thanks csirs, 5g, nr, sinr MATLAB Answers — New Questions
Finding the “center” of an extended ring
I have been experimenting with the image processing toolbox’s function "imfindcircles", and it works well. However, there is one issue: I have an extended big ring in the image where I want to recognise its "center" instead of the outer end of the ring (see attached figure, where the outer end is plotted with viscircles and the center and radius found by imfindcircles).
This is also mirrored in the data itself: both the inner and outer end of the big ring have a lower intensity than its center. Is there a way to force "imfindcircles" to use the ring of maximum intensity? (Note that I have applied a thresholding to my image, otherwise the gradient at the ring ends would not be as harsh, and imfindcircles would struggle to differentiate between the ring and artifacts neighbouring the ring.)
Or is there maybe an alternative that includes a second step? After all, the circle center is properly recognised, so I can maybe vary the radius slightly? Maybe I could add up all the values of pixels that would lie on the circle, and see where that reaches its maximum. Is there an easy way to do something like that?
openfig findcircle-test.figI have been experimenting with the image processing toolbox’s function "imfindcircles", and it works well. However, there is one issue: I have an extended big ring in the image where I want to recognise its "center" instead of the outer end of the ring (see attached figure, where the outer end is plotted with viscircles and the center and radius found by imfindcircles).
This is also mirrored in the data itself: both the inner and outer end of the big ring have a lower intensity than its center. Is there a way to force "imfindcircles" to use the ring of maximum intensity? (Note that I have applied a thresholding to my image, otherwise the gradient at the ring ends would not be as harsh, and imfindcircles would struggle to differentiate between the ring and artifacts neighbouring the ring.)
Or is there maybe an alternative that includes a second step? After all, the circle center is properly recognised, so I can maybe vary the radius slightly? Maybe I could add up all the values of pixels that would lie on the circle, and see where that reaches its maximum. Is there an easy way to do something like that?
openfig findcircle-test.fig I have been experimenting with the image processing toolbox’s function "imfindcircles", and it works well. However, there is one issue: I have an extended big ring in the image where I want to recognise its "center" instead of the outer end of the ring (see attached figure, where the outer end is plotted with viscircles and the center and radius found by imfindcircles).
This is also mirrored in the data itself: both the inner and outer end of the big ring have a lower intensity than its center. Is there a way to force "imfindcircles" to use the ring of maximum intensity? (Note that I have applied a thresholding to my image, otherwise the gradient at the ring ends would not be as harsh, and imfindcircles would struggle to differentiate between the ring and artifacts neighbouring the ring.)
Or is there maybe an alternative that includes a second step? After all, the circle center is properly recognised, so I can maybe vary the radius slightly? Maybe I could add up all the values of pixels that would lie on the circle, and see where that reaches its maximum. Is there an easy way to do something like that?
openfig findcircle-test.fig image segmentation MATLAB Answers — New Questions
Finding multiple Matrix in a txt file
I want to do radiobiological calculations for structures in a patient with two different plans. I have a txt file with all the data in it. The txt file contains among other things the biological structure (which exists in both plans), the biological data in two columns and two rows that specifies what plan and what structure it is.
I know how to code the math to do the calculations, but how do I most easy read the text file and store each plans column in like a matrix?
For example (in my own dumb coding brain) I would like matlab to "Search a txt file that has a certain name that the user can specify. For a specific organ like the bladder, put the data in a variable called something like "Bladder Plan 1" and "Bladder Plan 2". Do math. Do same for all other organs. Put result in a report. Save as pdf or file". I hope that the wonderful Matlab community can help me, since I am no Matrix wizard with coding.
For all patients the structures all have the same naming convention, so I guess I could specify somewhere/somehow what organs should be searched for in the text file and what I would like the variable to be called, so that the search in the text file could go quick.
If anyone has any tips and suggestions that would be great. I have attached an anonymized txt file of how it could look like.I want to do radiobiological calculations for structures in a patient with two different plans. I have a txt file with all the data in it. The txt file contains among other things the biological structure (which exists in both plans), the biological data in two columns and two rows that specifies what plan and what structure it is.
I know how to code the math to do the calculations, but how do I most easy read the text file and store each plans column in like a matrix?
For example (in my own dumb coding brain) I would like matlab to "Search a txt file that has a certain name that the user can specify. For a specific organ like the bladder, put the data in a variable called something like "Bladder Plan 1" and "Bladder Plan 2". Do math. Do same for all other organs. Put result in a report. Save as pdf or file". I hope that the wonderful Matlab community can help me, since I am no Matrix wizard with coding.
For all patients the structures all have the same naming convention, so I guess I could specify somewhere/somehow what organs should be searched for in the text file and what I would like the variable to be called, so that the search in the text file could go quick.
If anyone has any tips and suggestions that would be great. I have attached an anonymized txt file of how it could look like. I want to do radiobiological calculations for structures in a patient with two different plans. I have a txt file with all the data in it. The txt file contains among other things the biological structure (which exists in both plans), the biological data in two columns and two rows that specifies what plan and what structure it is.
I know how to code the math to do the calculations, but how do I most easy read the text file and store each plans column in like a matrix?
For example (in my own dumb coding brain) I would like matlab to "Search a txt file that has a certain name that the user can specify. For a specific organ like the bladder, put the data in a variable called something like "Bladder Plan 1" and "Bladder Plan 2". Do math. Do same for all other organs. Put result in a report. Save as pdf or file". I hope that the wonderful Matlab community can help me, since I am no Matrix wizard with coding.
For all patients the structures all have the same naming convention, so I guess I could specify somewhere/somehow what organs should be searched for in the text file and what I would like the variable to be called, so that the search in the text file could go quick.
If anyone has any tips and suggestions that would be great. I have attached an anonymized txt file of how it could look like. radiobiology MATLAB Answers — New Questions
2D data fitting – Surface
I have some numbers as a function of 2 variables: _( x, y ) ↦ z_.
I would like to know which function _z = z( x, y )_ best fits my data.
Unfortunately, I don’t have any hint, I mean, there’s no theoretical background on these numbers. They’re the result ( _z_ ) of some FEM simulations of a system, being the simulation a parametric sweep over two parameters ( _x_ and _y_ ) of the system.
Here’s my data:
x = [1 2 4 6 8 10 13 17 21 25];
y = [0.2 0.5 1 2 4 7 10 14 18 22];
z = [1 0.6844 0.3048 0.2124 0.1689 0.1432 0.1192 0.1015 0.0908 0.0841;…
1.000 0.7096 0.3595 0.2731 0.2322 0.2081 0.1857 0.1690 0.1590 0.1529;…
1.000 0.7451 0.4362 0.3585 0.3217 0.2999 0.2797 0.2648 0.2561 0.2504;…
1.000 0.7979 0.5519 0.4877 0.4574 0.4394 0.4228 0.4107 0.4037 0.3994;…
1.000 0.8628 0.6945 0.6490 0.6271 0.6145 0.6027 0.5945 0.5896 0.5870;…
1.000 0.9131 0.8057 0.7758 0.7614 0.7531 0.7457 0.7410 0.7383 0.7368;…
1.000 0.9397 0.8647 0.8436 0.8333 0.8278 0.8228 0.8195 0.8181 0.8171;…
1.000 0.9594 0.9087 0.8942 0.8877 0.8839 0.8808 0.8791 0.8783 0.8777;…
1.000 0.9705 0.9342 0.9238 0.9190 0.9165 0.9145 0.9133 0.9131 0.9127;…
1.000 0.9776 0.9502 0.9425 0.9390 0.9372 0.9358 0.9352 0.9349 0.9348];
I tried with MATLAB with the Curve Fitting app, but I didn’t succeed. The ‘polynomial’ fitting doesn’t work well. I would like to use the ‘custom equation’ fitting, but I don’t know what equation to start. I don’t have much practice in data analysis.
Any hint?
<<http://i.stack.imgur.com/tlqDu.png>>I have some numbers as a function of 2 variables: _( x, y ) ↦ z_.
I would like to know which function _z = z( x, y )_ best fits my data.
Unfortunately, I don’t have any hint, I mean, there’s no theoretical background on these numbers. They’re the result ( _z_ ) of some FEM simulations of a system, being the simulation a parametric sweep over two parameters ( _x_ and _y_ ) of the system.
Here’s my data:
x = [1 2 4 6 8 10 13 17 21 25];
y = [0.2 0.5 1 2 4 7 10 14 18 22];
z = [1 0.6844 0.3048 0.2124 0.1689 0.1432 0.1192 0.1015 0.0908 0.0841;…
1.000 0.7096 0.3595 0.2731 0.2322 0.2081 0.1857 0.1690 0.1590 0.1529;…
1.000 0.7451 0.4362 0.3585 0.3217 0.2999 0.2797 0.2648 0.2561 0.2504;…
1.000 0.7979 0.5519 0.4877 0.4574 0.4394 0.4228 0.4107 0.4037 0.3994;…
1.000 0.8628 0.6945 0.6490 0.6271 0.6145 0.6027 0.5945 0.5896 0.5870;…
1.000 0.9131 0.8057 0.7758 0.7614 0.7531 0.7457 0.7410 0.7383 0.7368;…
1.000 0.9397 0.8647 0.8436 0.8333 0.8278 0.8228 0.8195 0.8181 0.8171;…
1.000 0.9594 0.9087 0.8942 0.8877 0.8839 0.8808 0.8791 0.8783 0.8777;…
1.000 0.9705 0.9342 0.9238 0.9190 0.9165 0.9145 0.9133 0.9131 0.9127;…
1.000 0.9776 0.9502 0.9425 0.9390 0.9372 0.9358 0.9352 0.9349 0.9348];
I tried with MATLAB with the Curve Fitting app, but I didn’t succeed. The ‘polynomial’ fitting doesn’t work well. I would like to use the ‘custom equation’ fitting, but I don’t know what equation to start. I don’t have much practice in data analysis.
Any hint?
<<http://i.stack.imgur.com/tlqDu.png>> I have some numbers as a function of 2 variables: _( x, y ) ↦ z_.
I would like to know which function _z = z( x, y )_ best fits my data.
Unfortunately, I don’t have any hint, I mean, there’s no theoretical background on these numbers. They’re the result ( _z_ ) of some FEM simulations of a system, being the simulation a parametric sweep over two parameters ( _x_ and _y_ ) of the system.
Here’s my data:
x = [1 2 4 6 8 10 13 17 21 25];
y = [0.2 0.5 1 2 4 7 10 14 18 22];
z = [1 0.6844 0.3048 0.2124 0.1689 0.1432 0.1192 0.1015 0.0908 0.0841;…
1.000 0.7096 0.3595 0.2731 0.2322 0.2081 0.1857 0.1690 0.1590 0.1529;…
1.000 0.7451 0.4362 0.3585 0.3217 0.2999 0.2797 0.2648 0.2561 0.2504;…
1.000 0.7979 0.5519 0.4877 0.4574 0.4394 0.4228 0.4107 0.4037 0.3994;…
1.000 0.8628 0.6945 0.6490 0.6271 0.6145 0.6027 0.5945 0.5896 0.5870;…
1.000 0.9131 0.8057 0.7758 0.7614 0.7531 0.7457 0.7410 0.7383 0.7368;…
1.000 0.9397 0.8647 0.8436 0.8333 0.8278 0.8228 0.8195 0.8181 0.8171;…
1.000 0.9594 0.9087 0.8942 0.8877 0.8839 0.8808 0.8791 0.8783 0.8777;…
1.000 0.9705 0.9342 0.9238 0.9190 0.9165 0.9145 0.9133 0.9131 0.9127;…
1.000 0.9776 0.9502 0.9425 0.9390 0.9372 0.9358 0.9352 0.9349 0.9348];
I tried with MATLAB with the Curve Fitting app, but I didn’t succeed. The ‘polynomial’ fitting doesn’t work well. I would like to use the ‘custom equation’ fitting, but I don’t know what equation to start. I don’t have much practice in data analysis.
Any hint?
<<http://i.stack.imgur.com/tlqDu.png>> statistics, 3d, 2d, surface, data analysis, fitting, curve fitting, lsqcurvefit, nlinfit, fit regression surface to 3d data MATLAB Answers — New Questions
Which SLRT Functions Replace xPC Functions?
I need to update legacy r2010b MATLAB code that uses xPC functions to r2024a code that uses Simulink Real-Time functions. For example, I have replaced instances of xpctargetping with slrtpingtarget (https://www.mathworks.com/help/releases/R2020a/xpc/api/slrtpingtarget.html).
Are there modern SLRT replacement functions for legacy setxpcenv and xpctarget.fs/xpctarget.ftp functions? Maybe setslrtenv and slrt(‘target’) or slrealtime.fs/ftp? (https://www.mathworks.com/help/slrealtime/api/slrealtime.target.html)
Are these functions only available once connected to target hardware?I need to update legacy r2010b MATLAB code that uses xPC functions to r2024a code that uses Simulink Real-Time functions. For example, I have replaced instances of xpctargetping with slrtpingtarget (https://www.mathworks.com/help/releases/R2020a/xpc/api/slrtpingtarget.html).
Are there modern SLRT replacement functions for legacy setxpcenv and xpctarget.fs/xpctarget.ftp functions? Maybe setslrtenv and slrt(‘target’) or slrealtime.fs/ftp? (https://www.mathworks.com/help/slrealtime/api/slrealtime.target.html)
Are these functions only available once connected to target hardware? I need to update legacy r2010b MATLAB code that uses xPC functions to r2024a code that uses Simulink Real-Time functions. For example, I have replaced instances of xpctargetping with slrtpingtarget (https://www.mathworks.com/help/releases/R2020a/xpc/api/slrtpingtarget.html).
Are there modern SLRT replacement functions for legacy setxpcenv and xpctarget.fs/xpctarget.ftp functions? Maybe setslrtenv and slrt(‘target’) or slrealtime.fs/ftp? (https://www.mathworks.com/help/slrealtime/api/slrealtime.target.html)
Are these functions only available once connected to target hardware? simulink, xpc, slrt MATLAB Answers — New Questions
Error: Failed to initialize the interactive session
I am trying to validate a cluster profile. I was able to do all tests but the parallel pool test. I have attached my validation report below. Any help is appreciated.
VALIDATION REPORT
Profile: beoshock
Scheduler Type: Generic
Stage: Cluster connection test (parcluster)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:31 CDT 2021
Running Duration: 0 min 0 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: Job test (createJob)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:57 CDT 2021
Running Duration: 0 min 26 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: SPMD job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:21:59 CDT 2021
Finish Time: Thu May 13 12:22:37 CDT 2021
Running Duration: 0 min 38 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Pool job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:22:39 CDT 2021
Finish Time: Thu May 13 12:23:06 CDT 2021
Running Duration: 0 min 27 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Parallel pool test (parpool)
Status: Failed
Start Time: Thu May 13 12:23:08 CDT 2021
Finish Time: Thu May 13 12:24:41 CDT 2021
Running Duration: 1 min 33 sec
Description: Failed to initialize the interactive session.
Error Report: Failed to initialize the interactive session.
Caused by:
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (line 433)
The interactive communicating job errored with the following message: MatlabPoolPeerInstance{fLabIndex=1, fNumberOfLabs=2, fUuid=b10ec9e0-6fbc-43e5-8566-67ed5d06514d} was unable to find the host for MacBook-Pro:27370 due to a JVM UnknownHostException: nullI am trying to validate a cluster profile. I was able to do all tests but the parallel pool test. I have attached my validation report below. Any help is appreciated.
VALIDATION REPORT
Profile: beoshock
Scheduler Type: Generic
Stage: Cluster connection test (parcluster)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:31 CDT 2021
Running Duration: 0 min 0 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: Job test (createJob)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:57 CDT 2021
Running Duration: 0 min 26 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: SPMD job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:21:59 CDT 2021
Finish Time: Thu May 13 12:22:37 CDT 2021
Running Duration: 0 min 38 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Pool job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:22:39 CDT 2021
Finish Time: Thu May 13 12:23:06 CDT 2021
Running Duration: 0 min 27 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Parallel pool test (parpool)
Status: Failed
Start Time: Thu May 13 12:23:08 CDT 2021
Finish Time: Thu May 13 12:24:41 CDT 2021
Running Duration: 1 min 33 sec
Description: Failed to initialize the interactive session.
Error Report: Failed to initialize the interactive session.
Caused by:
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (line 433)
The interactive communicating job errored with the following message: MatlabPoolPeerInstance{fLabIndex=1, fNumberOfLabs=2, fUuid=b10ec9e0-6fbc-43e5-8566-67ed5d06514d} was unable to find the host for MacBook-Pro:27370 due to a JVM UnknownHostException: null I am trying to validate a cluster profile. I was able to do all tests but the parallel pool test. I have attached my validation report below. Any help is appreciated.
VALIDATION REPORT
Profile: beoshock
Scheduler Type: Generic
Stage: Cluster connection test (parcluster)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:31 CDT 2021
Running Duration: 0 min 0 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: Job test (createJob)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:57 CDT 2021
Running Duration: 0 min 26 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: SPMD job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:21:59 CDT 2021
Finish Time: Thu May 13 12:22:37 CDT 2021
Running Duration: 0 min 38 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Pool job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:22:39 CDT 2021
Finish Time: Thu May 13 12:23:06 CDT 2021
Running Duration: 0 min 27 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Parallel pool test (parpool)
Status: Failed
Start Time: Thu May 13 12:23:08 CDT 2021
Finish Time: Thu May 13 12:24:41 CDT 2021
Running Duration: 1 min 33 sec
Description: Failed to initialize the interactive session.
Error Report: Failed to initialize the interactive session.
Caused by:
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (line 433)
The interactive communicating job errored with the following message: MatlabPoolPeerInstance{fLabIndex=1, fNumberOfLabs=2, fUuid=b10ec9e0-6fbc-43e5-8566-67ed5d06514d} was unable to find the host for MacBook-Pro:27370 due to a JVM UnknownHostException: null cluster profile, parallel computing MATLAB Answers — New Questions
Facing license Issues while running a function from Communication Toolbox.
I am encountering a License Manager Error -4 when trying to use a function from the Communication Toolbox, even though I have an active license for it. The error message suggests that the maximum number of users for ‘Signal_Blocks’ has been reached, is ‘Signal_Blocks’ related to the DSP System Toolbox?.
License checkout failed.
License Manager Error -4
Maximum number of users for Signal_Blocks
reached.
Try again later.
I’m trying to understand why I’m getting this error when accessing a function from the Communication Toolbox. Does using a function from one toolbox require licenses for other toolboxes as well? Additionally, how can I find out which toolboxes are included in my current license?I am encountering a License Manager Error -4 when trying to use a function from the Communication Toolbox, even though I have an active license for it. The error message suggests that the maximum number of users for ‘Signal_Blocks’ has been reached, is ‘Signal_Blocks’ related to the DSP System Toolbox?.
License checkout failed.
License Manager Error -4
Maximum number of users for Signal_Blocks
reached.
Try again later.
I’m trying to understand why I’m getting this error when accessing a function from the Communication Toolbox. Does using a function from one toolbox require licenses for other toolboxes as well? Additionally, how can I find out which toolboxes are included in my current license? I am encountering a License Manager Error -4 when trying to use a function from the Communication Toolbox, even though I have an active license for it. The error message suggests that the maximum number of users for ‘Signal_Blocks’ has been reached, is ‘Signal_Blocks’ related to the DSP System Toolbox?.
License checkout failed.
License Manager Error -4
Maximum number of users for Signal_Blocks
reached.
Try again later.
I’m trying to understand why I’m getting this error when accessing a function from the Communication Toolbox. Does using a function from one toolbox require licenses for other toolboxes as well? Additionally, how can I find out which toolboxes are included in my current license? license, toolbox, dspsystemtoolbox MATLAB Answers — New Questions
How does Forward kinematik work in Robotics System Toolbox?
How does the Robot System Toolbox work internally?
I noticed some small offset in the results of the Forward Kinematics if I compare the result of getTransform with the plain geometric Forward Kinematics calculated with the parameters from the Datasheet (p. 61).
The offset also seems to be dynamic. So I wonder what the reason could be.
Is there some kind of dynamic simulation of the joints stiffnes?
Attached is some code to reproduce this:
% Compare DH forward Kinematics with Matlab Model of KinGen3
%% get robot model
close all
gen3 = loadrobot("kinovaGen3");
gen3.DataFormat = ‘column’;
eeName = ‘EndEffector_Link’;
% define q:
q=[ 1.18 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[ 1.18+180 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[0 0 0 0 0 0 0]’;
%% calculate FK with DH and with Matlab modell:
% DH
H_DH = getSingleH(getHcomplete(q),0,8)
pos_DH = H_DH(1:3,4);
% Model
H_mod = getTransform(gen3, q/180*pi’, eeName)
pos_mod=H_mod(1:3,4);
%calculate difference:
pos_dif=(pos_DH-pos_mod)*1000
%% Funktiondecalrations for forward kinematics
function H = getHcomplete(q)
% calculates H cell according to input angles
% wheras H{1}=H01, H{2}=H12, H{3}=H23, etc…
i=1;
R{i}=rotx(180)*rotz(q(i)); % Rotation
D{i}=[0 0 +156.4]’/1000; % Displacement
H{i}=RnD2H(R{i},D{i});
i=2;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 5.4 -128.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=3;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -210.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=4;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 6.4 -210.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=5;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -208.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=6;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 0 -105.9]’/1000;
H{i}=RnD2H(R{i},D{i});
i=7;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -105.9 0]’/1000;
H{i}=RnD2H(R{i},D{i});
i=8;
R{i}=rotx(180)*rotz(0);
D{i}=[0 0 -61.5]’/1000;
H{i}=RnD2H(R{i},D{i});
end
function H = RnD2H(R,D)
% combines Rotation and Displacement into homogenous transform
H = horzcat(R,D);
H = vertcat(H,[0 0 0 1]);
end
function H = getSingleH(h,von,bis)
% returns homogenous transfrormation from to defined frames
H=eye(4);
for i=von+(bis-von>0):sign(bis-von):bis+(von-bis>0)
H=H*h{i}^sign(bis-von);
end
endHow does the Robot System Toolbox work internally?
I noticed some small offset in the results of the Forward Kinematics if I compare the result of getTransform with the plain geometric Forward Kinematics calculated with the parameters from the Datasheet (p. 61).
The offset also seems to be dynamic. So I wonder what the reason could be.
Is there some kind of dynamic simulation of the joints stiffnes?
Attached is some code to reproduce this:
% Compare DH forward Kinematics with Matlab Model of KinGen3
%% get robot model
close all
gen3 = loadrobot("kinovaGen3");
gen3.DataFormat = ‘column’;
eeName = ‘EndEffector_Link’;
% define q:
q=[ 1.18 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[ 1.18+180 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[0 0 0 0 0 0 0]’;
%% calculate FK with DH and with Matlab modell:
% DH
H_DH = getSingleH(getHcomplete(q),0,8)
pos_DH = H_DH(1:3,4);
% Model
H_mod = getTransform(gen3, q/180*pi’, eeName)
pos_mod=H_mod(1:3,4);
%calculate difference:
pos_dif=(pos_DH-pos_mod)*1000
%% Funktiondecalrations for forward kinematics
function H = getHcomplete(q)
% calculates H cell according to input angles
% wheras H{1}=H01, H{2}=H12, H{3}=H23, etc…
i=1;
R{i}=rotx(180)*rotz(q(i)); % Rotation
D{i}=[0 0 +156.4]’/1000; % Displacement
H{i}=RnD2H(R{i},D{i});
i=2;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 5.4 -128.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=3;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -210.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=4;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 6.4 -210.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=5;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -208.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=6;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 0 -105.9]’/1000;
H{i}=RnD2H(R{i},D{i});
i=7;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -105.9 0]’/1000;
H{i}=RnD2H(R{i},D{i});
i=8;
R{i}=rotx(180)*rotz(0);
D{i}=[0 0 -61.5]’/1000;
H{i}=RnD2H(R{i},D{i});
end
function H = RnD2H(R,D)
% combines Rotation and Displacement into homogenous transform
H = horzcat(R,D);
H = vertcat(H,[0 0 0 1]);
end
function H = getSingleH(h,von,bis)
% returns homogenous transfrormation from to defined frames
H=eye(4);
for i=von+(bis-von>0):sign(bis-von):bis+(von-bis>0)
H=H*h{i}^sign(bis-von);
end
end How does the Robot System Toolbox work internally?
I noticed some small offset in the results of the Forward Kinematics if I compare the result of getTransform with the plain geometric Forward Kinematics calculated with the parameters from the Datasheet (p. 61).
The offset also seems to be dynamic. So I wonder what the reason could be.
Is there some kind of dynamic simulation of the joints stiffnes?
Attached is some code to reproduce this:
% Compare DH forward Kinematics with Matlab Model of KinGen3
%% get robot model
close all
gen3 = loadrobot("kinovaGen3");
gen3.DataFormat = ‘column’;
eeName = ‘EndEffector_Link’;
% define q:
q=[ 1.18 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[ 1.18+180 -68.68 18.47 -69.09 94.36 112.93 46.00]’;
%q=[0 0 0 0 0 0 0]’;
%% calculate FK with DH and with Matlab modell:
% DH
H_DH = getSingleH(getHcomplete(q),0,8)
pos_DH = H_DH(1:3,4);
% Model
H_mod = getTransform(gen3, q/180*pi’, eeName)
pos_mod=H_mod(1:3,4);
%calculate difference:
pos_dif=(pos_DH-pos_mod)*1000
%% Funktiondecalrations for forward kinematics
function H = getHcomplete(q)
% calculates H cell according to input angles
% wheras H{1}=H01, H{2}=H12, H{3}=H23, etc…
i=1;
R{i}=rotx(180)*rotz(q(i)); % Rotation
D{i}=[0 0 +156.4]’/1000; % Displacement
H{i}=RnD2H(R{i},D{i});
i=2;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 5.4 -128.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=3;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -210.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=4;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 6.4 -210.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=5;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -208.4 -6.4]’/1000;
H{i}=RnD2H(R{i},D{i});
i=6;
R{i}=rotx(+90)*rotz(q(i));
D{i}=[0 0 -105.9]’/1000;
H{i}=RnD2H(R{i},D{i});
i=7;
R{i}=rotx(-90)*rotz(q(i));
D{i}=[0 -105.9 0]’/1000;
H{i}=RnD2H(R{i},D{i});
i=8;
R{i}=rotx(180)*rotz(0);
D{i}=[0 0 -61.5]’/1000;
H{i}=RnD2H(R{i},D{i});
end
function H = RnD2H(R,D)
% combines Rotation and Displacement into homogenous transform
H = horzcat(R,D);
H = vertcat(H,[0 0 0 1]);
end
function H = getSingleH(h,von,bis)
% returns homogenous transfrormation from to defined frames
H=eye(4);
for i=von+(bis-von>0):sign(bis-von):bis+(von-bis>0)
H=H*h{i}^sign(bis-von);
end
end robotics system toolbox, gettransform, kinovagen3, loadrobot MATLAB Answers — New Questions
MATLAB not saving variables to workspace
I don’t know what’s wrong with my MATLAB. Every time I run the dummy.m using the F5 in the editor, all the variables are being displayed in the workspace. But when I run the NitrogenDef.m using again the F5 in the editor, all the variables used in the NitrogenDef.m are not displayed in the workspace. Any help with this? Thanks!I don’t know what’s wrong with my MATLAB. Every time I run the dummy.m using the F5 in the editor, all the variables are being displayed in the workspace. But when I run the NitrogenDef.m using again the F5 in the editor, all the variables used in the NitrogenDef.m are not displayed in the workspace. Any help with this? Thanks! I don’t know what’s wrong with my MATLAB. Every time I run the dummy.m using the F5 in the editor, all the variables are being displayed in the workspace. But when I run the NitrogenDef.m using again the F5 in the editor, all the variables used in the NitrogenDef.m are not displayed in the workspace. Any help with this? Thanks! workspace, function, variable MATLAB Answers — New Questions
Simulation with an RL Agent does not save simulation data
I have a reinforcement learning simulink model environment I am training in MATLAB 2023a, which I started porting to MATLAB 2024a. The model runs well in 2023a and saves the simulations done using the sim function. The environment has some signals that I want to save.
For the 2023a they got saved in the SimulationInfo object but that doesnt happen with 2024a. Do I have to activate something additionally in 2024a or is it a bug?
The images below detail the difference between the two versions. The env is a simulink envrionment
simEpisodes = 1;
simOpts = rlSimulationOptions("MaxSteps",1250,…
"NumSimulations", simEpisodes);
experience = sim(env,agent,simOpts);
save(strcat(results_dir,’/Experience.mat’),"experience")I have a reinforcement learning simulink model environment I am training in MATLAB 2023a, which I started porting to MATLAB 2024a. The model runs well in 2023a and saves the simulations done using the sim function. The environment has some signals that I want to save.
For the 2023a they got saved in the SimulationInfo object but that doesnt happen with 2024a. Do I have to activate something additionally in 2024a or is it a bug?
The images below detail the difference between the two versions. The env is a simulink envrionment
simEpisodes = 1;
simOpts = rlSimulationOptions("MaxSteps",1250,…
"NumSimulations", simEpisodes);
experience = sim(env,agent,simOpts);
save(strcat(results_dir,’/Experience.mat’),"experience") I have a reinforcement learning simulink model environment I am training in MATLAB 2023a, which I started porting to MATLAB 2024a. The model runs well in 2023a and saves the simulations done using the sim function. The environment has some signals that I want to save.
For the 2023a they got saved in the SimulationInfo object but that doesnt happen with 2024a. Do I have to activate something additionally in 2024a or is it a bug?
The images below detail the difference between the two versions. The env is a simulink envrionment
simEpisodes = 1;
simOpts = rlSimulationOptions("MaxSteps",1250,…
"NumSimulations", simEpisodes);
experience = sim(env,agent,simOpts);
save(strcat(results_dir,’/Experience.mat’),"experience") machine learning, deep learning, artificial intelligence, bug, reinforcement learning MATLAB Answers — New Questions
App designer TabGroup colours
I have been creating an app in app designer, and I cannot see any way to change the grey border of a tabgroup where there are no tabs. It is very ugly and I would rather this be transparent – does anyone know a fix for this? Or any clever way of using HTML/CSS to make this possible? Thanks in advance.
See picture below:I have been creating an app in app designer, and I cannot see any way to change the grey border of a tabgroup where there are no tabs. It is very ugly and I would rather this be transparent – does anyone know a fix for this? Or any clever way of using HTML/CSS to make this possible? Thanks in advance.
See picture below: I have been creating an app in app designer, and I cannot see any way to change the grey border of a tabgroup where there are no tabs. It is very ugly and I would rather this be transparent – does anyone know a fix for this? Or any clever way of using HTML/CSS to make this possible? Thanks in advance.
See picture below: app designer, tabgroup MATLAB Answers — New Questions
Error in boxchart (invalid parameter/value pair arguments)
I am trying to use Boxchart but am getting an error even when using the carbig dataset and functions as listed in the help files. Eventually I need to get boxcharts for ANOVA results. This is what I have. (The help file for anovan calls "Model_Year" as "mfg date" but I think this is the equivalent set of data)
aov = anovan(MPG,{org when},’model’,2,’varnames’,{‘Origin’,’Model_Year’})
boxchart(aov,["Origin"])
legend
The ANOVA seems to run just fine, but when it gets to the Boxchart I get this error. Any ideas? I’m using version R2023b.
Error using matlab.graphics.chart.primitive.BoxChart
Invalid parameter/value pair arguments.
Error in boxchart (line 186)
H(idx) = matlab.graphics.chart.primitive.BoxChart(‘Parent’, cax,…
Error in ANOVA_trial_file (line 2)
boxchart(p,["Origin"])I am trying to use Boxchart but am getting an error even when using the carbig dataset and functions as listed in the help files. Eventually I need to get boxcharts for ANOVA results. This is what I have. (The help file for anovan calls "Model_Year" as "mfg date" but I think this is the equivalent set of data)
aov = anovan(MPG,{org when},’model’,2,’varnames’,{‘Origin’,’Model_Year’})
boxchart(aov,["Origin"])
legend
The ANOVA seems to run just fine, but when it gets to the Boxchart I get this error. Any ideas? I’m using version R2023b.
Error using matlab.graphics.chart.primitive.BoxChart
Invalid parameter/value pair arguments.
Error in boxchart (line 186)
H(idx) = matlab.graphics.chart.primitive.BoxChart(‘Parent’, cax,…
Error in ANOVA_trial_file (line 2)
boxchart(p,["Origin"]) I am trying to use Boxchart but am getting an error even when using the carbig dataset and functions as listed in the help files. Eventually I need to get boxcharts for ANOVA results. This is what I have. (The help file for anovan calls "Model_Year" as "mfg date" but I think this is the equivalent set of data)
aov = anovan(MPG,{org when},’model’,2,’varnames’,{‘Origin’,’Model_Year’})
boxchart(aov,["Origin"])
legend
The ANOVA seems to run just fine, but when it gets to the Boxchart I get this error. Any ideas? I’m using version R2023b.
Error using matlab.graphics.chart.primitive.BoxChart
Invalid parameter/value pair arguments.
Error in boxchart (line 186)
H(idx) = matlab.graphics.chart.primitive.BoxChart(‘Parent’, cax,…
Error in ANOVA_trial_file (line 2)
boxchart(p,["Origin"]) boxchart, anova MATLAB Answers — New Questions
Error : Failure in initial user-supplied nonlinear constraint function evaluation.
Hello everyone!
I’m encountering an issue with my MATLAB code and could use some assistance. Specifically, I’m getting the following error message:
[sol, fval, exitflag, output] = solve(prob);
Caused by:
Failure in initial user-supplied nonlinear constraint function evaluation.
It seems to be related to the evaluation of the nonlinear constraint function. I’ve attached the relevant part of my code below. I’m particularly confused because I linearised all my constraint terms, so I wasn’t expecting any non-linearity.
Could you please help me identify the issue and suggest any potential fixes?
Thank you!
best Regards!
MyProblem()Hello everyone!
I’m encountering an issue with my MATLAB code and could use some assistance. Specifically, I’m getting the following error message:
[sol, fval, exitflag, output] = solve(prob);
Caused by:
Failure in initial user-supplied nonlinear constraint function evaluation.
It seems to be related to the evaluation of the nonlinear constraint function. I’ve attached the relevant part of my code below. I’m particularly confused because I linearised all my constraint terms, so I wasn’t expecting any non-linearity.
Could you please help me identify the issue and suggest any potential fixes?
Thank you!
best Regards!
MyProblem() Hello everyone!
I’m encountering an issue with my MATLAB code and could use some assistance. Specifically, I’m getting the following error message:
[sol, fval, exitflag, output] = solve(prob);
Caused by:
Failure in initial user-supplied nonlinear constraint function evaluation.
It seems to be related to the evaluation of the nonlinear constraint function. I’ve attached the relevant part of my code below. I’m particularly confused because I linearised all my constraint terms, so I wasn’t expecting any non-linearity.
Could you please help me identify the issue and suggest any potential fixes?
Thank you!
best Regards!
MyProblem() nlp, optimization, error MATLAB Answers — New Questions
Avast detected a virus threat (IDP.ALEXA.54) in my own standalone application
Hello everyone.
Recently, I have compiled my own standalone application using Matlab Compiler – let’s say it is called JHApp.exe. Then, I tried to test the functions of my JHApp.exe file occurring in the for_redistribution_files_only folder (i.e., without installation). During each very first run (with each new compiled version), a security alert is reported by Avast. I understand the antivirus is suspicious of that new executable file and I know this is quite common – this is not the major problem.
However, after several minutes of using JHApp.exe (the app makes many calculations and can create .xls, .html and .m files), I received a new, more specific alert, something like IDP.ALEXA.54 detected, and Avast moved JHApp.exe to the carantine.
Given that I have spent a lot of time coding the app and I want to share my app in a scientific community, it is very important for me that it is trustworthy and safe. May it happen that a harmful code, e.g., from an infected PC, is accidentally and unintentionally distributed together with a Matlab standalone application?
It is quite strange for me to imagine that – my PC does not seem to be infected (according to Avast), and I don’t think some harmful code can easily attack Matlab and hide in a standalone application.
Please, what do you think about that?
Thank you very much for your answers.
Best regards, Jakub HaiflerHello everyone.
Recently, I have compiled my own standalone application using Matlab Compiler – let’s say it is called JHApp.exe. Then, I tried to test the functions of my JHApp.exe file occurring in the for_redistribution_files_only folder (i.e., without installation). During each very first run (with each new compiled version), a security alert is reported by Avast. I understand the antivirus is suspicious of that new executable file and I know this is quite common – this is not the major problem.
However, after several minutes of using JHApp.exe (the app makes many calculations and can create .xls, .html and .m files), I received a new, more specific alert, something like IDP.ALEXA.54 detected, and Avast moved JHApp.exe to the carantine.
Given that I have spent a lot of time coding the app and I want to share my app in a scientific community, it is very important for me that it is trustworthy and safe. May it happen that a harmful code, e.g., from an infected PC, is accidentally and unintentionally distributed together with a Matlab standalone application?
It is quite strange for me to imagine that – my PC does not seem to be infected (according to Avast), and I don’t think some harmful code can easily attack Matlab and hide in a standalone application.
Please, what do you think about that?
Thank you very much for your answers.
Best regards, Jakub Haifler Hello everyone.
Recently, I have compiled my own standalone application using Matlab Compiler – let’s say it is called JHApp.exe. Then, I tried to test the functions of my JHApp.exe file occurring in the for_redistribution_files_only folder (i.e., without installation). During each very first run (with each new compiled version), a security alert is reported by Avast. I understand the antivirus is suspicious of that new executable file and I know this is quite common – this is not the major problem.
However, after several minutes of using JHApp.exe (the app makes many calculations and can create .xls, .html and .m files), I received a new, more specific alert, something like IDP.ALEXA.54 detected, and Avast moved JHApp.exe to the carantine.
Given that I have spent a lot of time coding the app and I want to share my app in a scientific community, it is very important for me that it is trustworthy and safe. May it happen that a harmful code, e.g., from an infected PC, is accidentally and unintentionally distributed together with a Matlab standalone application?
It is quite strange for me to imagine that – my PC does not seem to be infected (according to Avast), and I don’t think some harmful code can easily attack Matlab and hide in a standalone application.
Please, what do you think about that?
Thank you very much for your answers.
Best regards, Jakub Haifler virus threat, standalone application, compiler, security, alert MATLAB Answers — New Questions
How do I identify the MEX function that caused MATLAB to crash?
MATLAB crashed when I tried running my code and I believe the cause of the crash was a MEX function due to the following message at the bottom on the MATLAB crash log:
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
How can I determine from the crash log which MEX function caused the crash?MATLAB crashed when I tried running my code and I believe the cause of the crash was a MEX function due to the following message at the bottom on the MATLAB crash log:
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
How can I determine from the crash log which MEX function caused the crash? MATLAB crashed when I tried running my code and I believe the cause of the crash was a MEX function due to the following message at the bottom on the MATLAB crash log:
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
How can I determine from the crash log which MEX function caused the crash? mex, mexfunction, mexfunctionadapter MATLAB Answers — New Questions
Why do I get the error: “Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)”?
Hi,
I’m trying to implement some ROS2 custom messages into Matlab and I’ve not found a solution yet.
I downloaded the following repo: https://github.com/ros2/common_interfaces.git
In order to recreate the errors:
download the repo (I choose to clone it in the home);
open Matlab and move to this folder;
give the following command in the command window
ros2genmsg(".")
After this, I get these errors:
>> ros2genmsg(".")
Identifying message files in folder ‘/home/alberto/common_interfaces’..Validating message files in folder ‘/home/alberto/common_interfaces’..Done.
Done.
[0/11] Generating MATLAB interfaces for custom message packages… 0%Error using ()
Key not found.
Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)
matlabInCompatibleCompilerVer = supportedCompilerVersions(matlabLIBSTDCXXVersionNum+1);
Error in ros.internal.ROSProjectBuilder (line 453)
[h.GccLocation, h.GppLocation] = ros.internal.utilities.checkAndGetCompatibleCompilersLocation();
Error in ros.ros2.internal.ColconBuilder (line 26)
h@ros.internal.ROSProjectBuilder(varargin{:});
Error in ros2genmsg (line 278)
builder = ros.ros2.internal.ColconBuilder(genDir, pkgInfos{iPkg}, UseNinja=useNinja, SuppressOutput=suppressOutput);
I tried to recompile ROS packages and even to change compilers’ version, but I can’t find a way out.
I’m working on Ubuntu 22.04, the Matlab version that I’m using is:
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Operating System: Linux 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Following, I’m reporting versions of gcc, g++, Python, cmake and ROS:
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Python 3.10.12
cmake 3.22.1
ROS2 humble
Thanks for the help.Hi,
I’m trying to implement some ROS2 custom messages into Matlab and I’ve not found a solution yet.
I downloaded the following repo: https://github.com/ros2/common_interfaces.git
In order to recreate the errors:
download the repo (I choose to clone it in the home);
open Matlab and move to this folder;
give the following command in the command window
ros2genmsg(".")
After this, I get these errors:
>> ros2genmsg(".")
Identifying message files in folder ‘/home/alberto/common_interfaces’..Validating message files in folder ‘/home/alberto/common_interfaces’..Done.
Done.
[0/11] Generating MATLAB interfaces for custom message packages… 0%Error using ()
Key not found.
Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)
matlabInCompatibleCompilerVer = supportedCompilerVersions(matlabLIBSTDCXXVersionNum+1);
Error in ros.internal.ROSProjectBuilder (line 453)
[h.GccLocation, h.GppLocation] = ros.internal.utilities.checkAndGetCompatibleCompilersLocation();
Error in ros.ros2.internal.ColconBuilder (line 26)
h@ros.internal.ROSProjectBuilder(varargin{:});
Error in ros2genmsg (line 278)
builder = ros.ros2.internal.ColconBuilder(genDir, pkgInfos{iPkg}, UseNinja=useNinja, SuppressOutput=suppressOutput);
I tried to recompile ROS packages and even to change compilers’ version, but I can’t find a way out.
I’m working on Ubuntu 22.04, the Matlab version that I’m using is:
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Operating System: Linux 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Following, I’m reporting versions of gcc, g++, Python, cmake and ROS:
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Python 3.10.12
cmake 3.22.1
ROS2 humble
Thanks for the help. Hi,
I’m trying to implement some ROS2 custom messages into Matlab and I’ve not found a solution yet.
I downloaded the following repo: https://github.com/ros2/common_interfaces.git
In order to recreate the errors:
download the repo (I choose to clone it in the home);
open Matlab and move to this folder;
give the following command in the command window
ros2genmsg(".")
After this, I get these errors:
>> ros2genmsg(".")
Identifying message files in folder ‘/home/alberto/common_interfaces’..Validating message files in folder ‘/home/alberto/common_interfaces’..Done.
Done.
[0/11] Generating MATLAB interfaces for custom message packages… 0%Error using ()
Key not found.
Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)
matlabInCompatibleCompilerVer = supportedCompilerVersions(matlabLIBSTDCXXVersionNum+1);
Error in ros.internal.ROSProjectBuilder (line 453)
[h.GccLocation, h.GppLocation] = ros.internal.utilities.checkAndGetCompatibleCompilersLocation();
Error in ros.ros2.internal.ColconBuilder (line 26)
h@ros.internal.ROSProjectBuilder(varargin{:});
Error in ros2genmsg (line 278)
builder = ros.ros2.internal.ColconBuilder(genDir, pkgInfos{iPkg}, UseNinja=useNinja, SuppressOutput=suppressOutput);
I tried to recompile ROS packages and even to change compilers’ version, but I can’t find a way out.
I’m working on Ubuntu 22.04, the Matlab version that I’m using is:
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Operating System: Linux 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Following, I’m reporting versions of gcc, g++, Python, cmake and ROS:
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Python 3.10.12
cmake 3.22.1
ROS2 humble
Thanks for the help. ros2, matlab, custom messages, ros2genmsg, ubuntu2204 MATLAB Answers — New Questions
Conversion to double from cell is not possible
I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks!I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks! I’m working with a script that simulates a communication channel, and am running into a "Conversion to doube from cell is not possible". The line throing an error works normally in a script, however when I put it inside a custom defined function within my script I get an error.
R is a 1339×17 double
D is a 16384×1 double
N, Npst, and Npre are constants of 1352, 13, and 2, respectively.
How could I cast the cell into a double without having an error being thrown?
Thanks! matlab, cell, double, conversion error MATLAB Answers — New Questions
Finding mode of each row in an array of Strings
Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings.Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings. Currently I have an array with 3 columns and a lot of rows (about 50,000). Each value is a string I essentially want to compare the 3 values in a row and find the most common.
Say my input table looked like the following
Apple Bannana Apple
Cherry Cherry Apple
Mango Mango Mango
My outputs would be
Apple
Cherry
Mango
Please let me know if there is any advice, I have tried mode but it does not work for strings. table, matrices MATLAB Answers — New Questions