Tag Archives: matlab
set simulnk Scope Property—-BackgroundColor
i‘m try to set simulnk Scope Property—-BackgroundColor; use below code ,it works, but when close and reopen the model, the property recovered to default;
open_system([modelname ‘/scop4sim’]);
set(0,’ShowHiddenHandles’,’On’)
handles = guihandles(gcf);
handles.VisualizationPanel.BackgroundColor=[1 1 0];
but when set the BackgroundColor use style GUI by mouse,then close and reopen ,the BackgroundColor property is the set Vaule by mouse,not recovered;
so what’s the problem, why set by code reopen model Scope not save the property seted;i‘m try to set simulnk Scope Property—-BackgroundColor; use below code ,it works, but when close and reopen the model, the property recovered to default;
open_system([modelname ‘/scop4sim’]);
set(0,’ShowHiddenHandles’,’On’)
handles = guihandles(gcf);
handles.VisualizationPanel.BackgroundColor=[1 1 0];
but when set the BackgroundColor use style GUI by mouse,then close and reopen ,the BackgroundColor property is the set Vaule by mouse,not recovered;
so what’s the problem, why set by code reopen model Scope not save the property seted; i‘m try to set simulnk Scope Property—-BackgroundColor; use below code ,it works, but when close and reopen the model, the property recovered to default;
open_system([modelname ‘/scop4sim’]);
set(0,’ShowHiddenHandles’,’On’)
handles = guihandles(gcf);
handles.VisualizationPanel.BackgroundColor=[1 1 0];
but when set the BackgroundColor use style GUI by mouse,then close and reopen ,the BackgroundColor property is the set Vaule by mouse,not recovered;
so what’s the problem, why set by code reopen model Scope not save the property seted; simulink, scope, property set MATLAB Answers — New Questions
Is there a good way to use the Optuna hyperparameter optimization framework in MATLAB?
As we all know, Optuna is a well-regarded hyperparameter optimization framework that is independent of any machine learning framework and is very easy to use in Python. However, my cost object-function is in MATLAB, which typically belongs to black-box optimization, and I am unsure how to use the Optuna library.
I also know that the Statistics and Machine Learning Toolbox has techniques like random search, grid search, and Bayesian hyperparameter optimization, but they haven’t performed very well. The Global Optimization Toolbox can use heuristic search algorithms such as GA and PSO, but I am limited by the high computational cost of the cost function. I also tried surrogateopt. Although the iteration speed is relatively fast, it tends to get stuck in local optima, causing subsequent iterations to nearly stop. Overall, it doesn’t perform as well as the PSO algorithm! Therefore, I would like to explore the performance of the Optuna library.As we all know, Optuna is a well-regarded hyperparameter optimization framework that is independent of any machine learning framework and is very easy to use in Python. However, my cost object-function is in MATLAB, which typically belongs to black-box optimization, and I am unsure how to use the Optuna library.
I also know that the Statistics and Machine Learning Toolbox has techniques like random search, grid search, and Bayesian hyperparameter optimization, but they haven’t performed very well. The Global Optimization Toolbox can use heuristic search algorithms such as GA and PSO, but I am limited by the high computational cost of the cost function. I also tried surrogateopt. Although the iteration speed is relatively fast, it tends to get stuck in local optima, causing subsequent iterations to nearly stop. Overall, it doesn’t perform as well as the PSO algorithm! Therefore, I would like to explore the performance of the Optuna library. As we all know, Optuna is a well-regarded hyperparameter optimization framework that is independent of any machine learning framework and is very easy to use in Python. However, my cost object-function is in MATLAB, which typically belongs to black-box optimization, and I am unsure how to use the Optuna library.
I also know that the Statistics and Machine Learning Toolbox has techniques like random search, grid search, and Bayesian hyperparameter optimization, but they haven’t performed very well. The Global Optimization Toolbox can use heuristic search algorithms such as GA and PSO, but I am limited by the high computational cost of the cost function. I also tried surrogateopt. Although the iteration speed is relatively fast, it tends to get stuck in local optima, causing subsequent iterations to nearly stop. Overall, it doesn’t perform as well as the PSO algorithm! Therefore, I would like to explore the performance of the Optuna library. hyperparameter optimization, statistics, machine learning MATLAB Answers — New Questions
the squential feature selection with Sequentialfs function
Hi all,
I’m having trouble with feature selection; could someone please assist me?
My code is:
X = trainingFeatures;
y = trainingLabels;
c = cvpartition(y,’k’,10);
opts = statset(‘display’,’iter’);
fun = @(XT,yT,Xt,yt)…
(sum(~strcmp(yt,classify(Xt,XT,yT,’quadratic’))));
[fs,history] = sequentialfs(fun,X,y,’cv’,c,’options’,opts);
When we run the code, we get:Hi all,
I’m having trouble with feature selection; could someone please assist me?
My code is:
X = trainingFeatures;
y = trainingLabels;
c = cvpartition(y,’k’,10);
opts = statset(‘display’,’iter’);
fun = @(XT,yT,Xt,yt)…
(sum(~strcmp(yt,classify(Xt,XT,yT,’quadratic’))));
[fs,history] = sequentialfs(fun,X,y,’cv’,c,’options’,opts);
When we run the code, we get: Hi all,
I’m having trouble with feature selection; could someone please assist me?
My code is:
X = trainingFeatures;
y = trainingLabels;
c = cvpartition(y,’k’,10);
opts = statset(‘display’,’iter’);
fun = @(XT,yT,Xt,yt)…
(sum(~strcmp(yt,classify(Xt,XT,yT,’quadratic’))));
[fs,history] = sequentialfs(fun,X,y,’cv’,c,’options’,opts);
When we run the code, we get: feature selection, image processing, sequentialfs, machine learning, artificial intelligence MATLAB Answers — New Questions
Resulting Model Workspace when using Simulink InputObject
Hello,
I am currently playing around in using the model workspace in Simulink and overwriting some of the variables via the Simulink InputObject. But I am facing an issue: How do I know what I simulated in the end. E.g. I would like to put the value of certain parameters in the figures I programatically generate. Or I simply would like to store the parameter set alongside the simulation results.
So the question is: How can I retrieve the resulting state of the model workspace, when using a Simulink InputObject when simulating with the sim command?
I mean I could make sure, that the InputObject provides values for all the variables in the model workspace. This way I could retrieve the state from the InputObject or the source, which feeds the InputObject. But then I would loose the flexibility to relay on default values stored in the model workspace itself.
Thank you for your help in advance.Hello,
I am currently playing around in using the model workspace in Simulink and overwriting some of the variables via the Simulink InputObject. But I am facing an issue: How do I know what I simulated in the end. E.g. I would like to put the value of certain parameters in the figures I programatically generate. Or I simply would like to store the parameter set alongside the simulation results.
So the question is: How can I retrieve the resulting state of the model workspace, when using a Simulink InputObject when simulating with the sim command?
I mean I could make sure, that the InputObject provides values for all the variables in the model workspace. This way I could retrieve the state from the InputObject or the source, which feeds the InputObject. But then I would loose the flexibility to relay on default values stored in the model workspace itself.
Thank you for your help in advance. Hello,
I am currently playing around in using the model workspace in Simulink and overwriting some of the variables via the Simulink InputObject. But I am facing an issue: How do I know what I simulated in the end. E.g. I would like to put the value of certain parameters in the figures I programatically generate. Or I simply would like to store the parameter set alongside the simulation results.
So the question is: How can I retrieve the resulting state of the model workspace, when using a Simulink InputObject when simulating with the sim command?
I mean I could make sure, that the InputObject provides values for all the variables in the model workspace. This way I could retrieve the state from the InputObject or the source, which feeds the InputObject. But then I would loose the flexibility to relay on default values stored in the model workspace itself.
Thank you for your help in advance. simulink, workspace MATLAB Answers — New Questions
generated “unvaforable zero” value from multiplying two matrices, how to solve/correct it?
for simplicity, i have a two matrices A and B generated by matlab like below. when i calculated manually by excel with the function mmult(A;B) the value of C is vaforable like this. even when i increasing the decimal. especially the value of cell matrix C at 3,1 it was definetly zero
but when i multiply them in matlab i got value of C like this
how to deal with this type of problem? any guidance will help me alot, because i got bunch of wild value zero like this 🙁 thanks a lott.
the following attachments is my full code, matrix A is k_sup and matrix B is uaa, and matrix C is Fsupt in my line code. input3Dxlsx is my input.
P.S
i tried calculate separately with new script (like the following A*B bottom), copy those matrices from generated excel (so the value is accurate), and the generated value of matrix C is entirely different, like this:
here is the following matrix A and B i copy from generated excel
A = [-3710000000 0 0 0 0 0;
0 -12624305.56 0 0 0 75745833.33;
0 0 -2318750 0 -13912500 0;
0 0 0 -69358333.33 0 0;
0 0 13912500 0 55650000 0;
0 -75745833.33 0 0 0 302983333.3]
B = [0
0
-0.025876011
0
0.004312668
0]
C = A*Bfor simplicity, i have a two matrices A and B generated by matlab like below. when i calculated manually by excel with the function mmult(A;B) the value of C is vaforable like this. even when i increasing the decimal. especially the value of cell matrix C at 3,1 it was definetly zero
but when i multiply them in matlab i got value of C like this
how to deal with this type of problem? any guidance will help me alot, because i got bunch of wild value zero like this 🙁 thanks a lott.
the following attachments is my full code, matrix A is k_sup and matrix B is uaa, and matrix C is Fsupt in my line code. input3Dxlsx is my input.
P.S
i tried calculate separately with new script (like the following A*B bottom), copy those matrices from generated excel (so the value is accurate), and the generated value of matrix C is entirely different, like this:
here is the following matrix A and B i copy from generated excel
A = [-3710000000 0 0 0 0 0;
0 -12624305.56 0 0 0 75745833.33;
0 0 -2318750 0 -13912500 0;
0 0 0 -69358333.33 0 0;
0 0 13912500 0 55650000 0;
0 -75745833.33 0 0 0 302983333.3]
B = [0
0
-0.025876011
0
0.004312668
0]
C = A*B for simplicity, i have a two matrices A and B generated by matlab like below. when i calculated manually by excel with the function mmult(A;B) the value of C is vaforable like this. even when i increasing the decimal. especially the value of cell matrix C at 3,1 it was definetly zero
but when i multiply them in matlab i got value of C like this
how to deal with this type of problem? any guidance will help me alot, because i got bunch of wild value zero like this 🙁 thanks a lott.
the following attachments is my full code, matrix A is k_sup and matrix B is uaa, and matrix C is Fsupt in my line code. input3Dxlsx is my input.
P.S
i tried calculate separately with new script (like the following A*B bottom), copy those matrices from generated excel (so the value is accurate), and the generated value of matrix C is entirely different, like this:
here is the following matrix A and B i copy from generated excel
A = [-3710000000 0 0 0 0 0;
0 -12624305.56 0 0 0 75745833.33;
0 0 -2318750 0 -13912500 0;
0 0 0 -69358333.33 0 0;
0 0 13912500 0 55650000 0;
0 -75745833.33 0 0 0 302983333.3]
B = [0
0
-0.025876011
0
0.004312668
0]
C = A*B matlab, excel, arrays, array, cell array, multiple MATLAB Answers — New Questions
What is the difference between Permute Dimensions and Transpose blocks in discrete systems?
My question is regarding the Permute Dimensions and Transpose blocks in Models targeted to generate code via EmbeddedCoder.
1 – What is the difference between the blocks in terms of functionality and CPU load and speed in generated code.
2 – Which is generally better?My question is regarding the Permute Dimensions and Transpose blocks in Models targeted to generate code via EmbeddedCoder.
1 – What is the difference between the blocks in terms of functionality and CPU load and speed in generated code.
2 – Which is generally better? My question is regarding the Permute Dimensions and Transpose blocks in Models targeted to generate code via EmbeddedCoder.
1 – What is the difference between the blocks in terms of functionality and CPU load and speed in generated code.
2 – Which is generally better? optimization, arrays, transpose, permutate, embedded coder, cpu MATLAB Answers — New Questions
Running all Nastran input .bdf files contained in a folder using Matlab
Hello everyone,
I am trying to run a number of nastran input.bdf files contained in a folder using "system "command in matlab
System command works well when i secify onle one file named"1.bdf" like:
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe 1.bdf’)
But,I have three bdf files in folder, I am trying to run using for loop
I have tried:
……………………………………………………………………….
files = dir(‘*.bdf’);
for i = 1 : length(files)
filename = files(K).name;
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe filename’)
end
……………………………………………………………………………
But it does not start nastran ,rather gives output such as
ans=0
ans=0
ans=0Hello everyone,
I am trying to run a number of nastran input.bdf files contained in a folder using "system "command in matlab
System command works well when i secify onle one file named"1.bdf" like:
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe 1.bdf’)
But,I have three bdf files in folder, I am trying to run using for loop
I have tried:
……………………………………………………………………….
files = dir(‘*.bdf’);
for i = 1 : length(files)
filename = files(K).name;
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe filename’)
end
……………………………………………………………………………
But it does not start nastran ,rather gives output such as
ans=0
ans=0
ans=0 Hello everyone,
I am trying to run a number of nastran input.bdf files contained in a folder using "system "command in matlab
System command works well when i secify onle one file named"1.bdf" like:
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe 1.bdf’)
But,I have three bdf files in folder, I am trying to run using for loop
I have tried:
……………………………………………………………………….
files = dir(‘*.bdf’);
for i = 1 : length(files)
filename = files(K).name;
system(‘D:MSC.SoftwareMSC_Nastran20180binnastranw.exe filename’)
end
……………………………………………………………………………
But it does not start nastran ,rather gives output such as
ans=0
ans=0
ans=0 running nastran job in matlab MATLAB Answers — New Questions
How to quantify variance explained from PCA?
Hi,
I want to quantify the amount of variance explained by PCA. However, I want to define the PCs using one half of my data, and test it using the other half as follows:
[COEFF,SCORE,latent,tsquare] = princomp(InputMatrix_TrainingData); %InputMatrix is an 8 x 78 matrix.
RecomputedScores = InputMatrix_TestData*COEFF; %Output
This works fine for recomputing the scores based upon alternate data, but how do I recompute the amount of variance explained etc. ?
ThanksHi,
I want to quantify the amount of variance explained by PCA. However, I want to define the PCs using one half of my data, and test it using the other half as follows:
[COEFF,SCORE,latent,tsquare] = princomp(InputMatrix_TrainingData); %InputMatrix is an 8 x 78 matrix.
RecomputedScores = InputMatrix_TestData*COEFF; %Output
This works fine for recomputing the scores based upon alternate data, but how do I recompute the amount of variance explained etc. ?
Thanks Hi,
I want to quantify the amount of variance explained by PCA. However, I want to define the PCs using one half of my data, and test it using the other half as follows:
[COEFF,SCORE,latent,tsquare] = princomp(InputMatrix_TrainingData); %InputMatrix is an 8 x 78 matrix.
RecomputedScores = InputMatrix_TestData*COEFF; %Output
This works fine for recomputing the scores based upon alternate data, but how do I recompute the amount of variance explained etc. ?
Thanks pca; svd MATLAB Answers — New Questions
Local variables are getting generated after code generation using embedded coder and if statement expression is not Boolean type throwing an error after running polyspace
An Image shown below in which guard condition is mentioned whose if statement is non compitant as per MISRA C 2012 Rule 14.4
As per Rule if statement should have boolean type expression.An Image shown below in which guard condition is mentioned whose if statement is non compitant as per MISRA C 2012 Rule 14.4
As per Rule if statement should have boolean type expression. An Image shown below in which guard condition is mentioned whose if statement is non compitant as per MISRA C 2012 Rule 14.4
As per Rule if statement should have boolean type expression. misra c 2012, 14.4 rule MATLAB Answers — New Questions
No unconditional default transitions help
Hello, I am running into an issue with the state below. I am a bit stuck, previously I had set the SFNoUnconditionalDefaultTransitionDiag parameter to be a warning but changed it to an error now. Now I am unsure on how going about fixing this error.
In a default transition, every path must lead to a substate and there must be one path that is not guarded by a condition or triggered by an event. Suggested Actions
– Terminate every path along the default transition in a substate.
– Ensure one default transition path is not guarded by a condition or triggered by an event.Hello, I am running into an issue with the state below. I am a bit stuck, previously I had set the SFNoUnconditionalDefaultTransitionDiag parameter to be a warning but changed it to an error now. Now I am unsure on how going about fixing this error.
In a default transition, every path must lead to a substate and there must be one path that is not guarded by a condition or triggered by an event. Suggested Actions
– Terminate every path along the default transition in a substate.
– Ensure one default transition path is not guarded by a condition or triggered by an event. Hello, I am running into an issue with the state below. I am a bit stuck, previously I had set the SFNoUnconditionalDefaultTransitionDiag parameter to be a warning but changed it to an error now. Now I am unsure on how going about fixing this error.
In a default transition, every path must lead to a substate and there must be one path that is not guarded by a condition or triggered by an event. Suggested Actions
– Terminate every path along the default transition in a substate.
– Ensure one default transition path is not guarded by a condition or triggered by an event. simulink, stateflow MATLAB Answers — New Questions
problem using fplot for small arguments of spherical bessel functions
i’m trying to plot spherical bessel functions (i. e. half integer order bessel functions) for small arguments (x << 1) and i’ve tried using vectors and it turns out very well; but the problem is when i try to use symbolic variable to define the function and plot it, i observe like meshing problems or diverging behavior (like in the image below). is there a way to fix it?
i’ve already tried modify the meshdensity but the problem remains. thanks a lot
l = 6; % order of the bessel function
syms r
rho = sqrt(pi./(2*r)) .* besselj(l + 0.5,r); % definition of spherical bessel function
% in terms of bessel function
f1 = figure;
fplot(real(rho),[0 0.35])
ylim([-0.1,0.5])i’m trying to plot spherical bessel functions (i. e. half integer order bessel functions) for small arguments (x << 1) and i’ve tried using vectors and it turns out very well; but the problem is when i try to use symbolic variable to define the function and plot it, i observe like meshing problems or diverging behavior (like in the image below). is there a way to fix it?
i’ve already tried modify the meshdensity but the problem remains. thanks a lot
l = 6; % order of the bessel function
syms r
rho = sqrt(pi./(2*r)) .* besselj(l + 0.5,r); % definition of spherical bessel function
% in terms of bessel function
f1 = figure;
fplot(real(rho),[0 0.35])
ylim([-0.1,0.5]) i’m trying to plot spherical bessel functions (i. e. half integer order bessel functions) for small arguments (x << 1) and i’ve tried using vectors and it turns out very well; but the problem is when i try to use symbolic variable to define the function and plot it, i observe like meshing problems or diverging behavior (like in the image below). is there a way to fix it?
i’ve already tried modify the meshdensity but the problem remains. thanks a lot
l = 6; % order of the bessel function
syms r
rho = sqrt(pi./(2*r)) .* besselj(l + 0.5,r); % definition of spherical bessel function
% in terms of bessel function
f1 = figure;
fplot(real(rho),[0 0.35])
ylim([-0.1,0.5]) fplot, syms, spherical bessel function MATLAB Answers — New Questions
MATLAB on Linux crashes when importing Python module
Any time I try to import a Python module, whether it’s from the standard library, installed, or custom, MATLAB crashed when I call py.importlib.import_module(). Here’s the crash log I get:
——————————————————————————–
abort() detected at Thu Jun 27 16:12:00 2019 -0400
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : ubuntu:GNOME
GNU C Library : 2.27 stable
Graphics Driver : Unknown hardware
Java Version : Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 5340214
MATLAB Root : /usr/local/MATLAB/R2018a
MATLAB Version : 9.4.0.813654 (R2018a)
OpenGL : hardware
Operating System : Ubuntu 18.04.2 LTS
Process ID : 72835
Processor ID : x86 Family 143 Model 1 Stepping 1, AuthenticAMD
Session Key : 0f3fa0ad-c4e3-4220-bbe7-b8df6cca1d4a
Static TLS mitigation : Disabled: Cannot load X11
Window System : The X.Org Foundation (12001000), display :0
Fault Count: 1
Abnormal termination
Register State (from fault):
RAX = 0000000000000000 RBX = 00007f805bff5860
RCX = 00007f80804a1e97 RDX = 0000000000000000
RSP = 00007f805bff55f0 RBP = 00007f805bff5960
RSI = 00007f805bff55f0 RDI = 0000000000000002
R8 = 0000000000000000 R9 = 00007f805bff55f0
R10 = 0000000000000008 R11 = 0000000000000246
R12 = 00007f805bff5860 R13 = 0000000000001000
R14 = 0000000000000000 R15 = 0000000000000030
RIP = 00007f80804a1e97 EFL = 0000000000000246
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f80804a1e97 /lib/x86_64-linux-gnu/libc.so.6+00257687 gsignal+00000199
[ 1] 0x00007f80804a3801 /lib/x86_64-linux-gnu/libc.so.6+00264193 abort+00000321
[ 2] 0x00007f80804ec897 /lib/x86_64-linux-gnu/libc.so.6+00563351
[ 3] 0x00007f80804f390a /lib/x86_64-linux-gnu/libc.so.6+00592138
[ 4] 0x00007f80804fae1c /lib/x86_64-linux-gnu/libc.so.6+00622108 cfree+00001228
[ 5] 0x00007f7e75d8456d /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406317 EVP_MD_CTX_reset+00000205
[ 6] 0x00007f7e75d8459a /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406362 EVP_MD_CTX_free+00000010
[ 7] 0x00007f7f0c002e87 /home/mlh6/anaconda3/lib/python3.7/lib-dynload/_hashlib.cpython-37m-x86_64-linux-gnu.so+00011911
[ 8] 0x00007f7e772140cc /home/mlh6/anaconda3/lib/libpython3.7m.so+00426188 _PyEval_EvalFrameDefault+00008396
[ 9] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 10] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 11] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 12] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 13] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 14] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 15] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 16] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 17] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 18] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 19] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 20] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 21] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 22] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 23] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 24] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 25] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 26] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 27] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 28] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 29] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 30] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 31] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 32] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 33] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 34] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 35] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 36] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 37] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 38] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 39] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 40] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 41] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 42] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 43] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 44] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 45] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 46] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 47] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 48] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 49] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 50] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 51] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 52] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 53] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 54] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 55] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 56] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 57] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 58] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 59] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 60] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 61] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 62] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 63] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 64] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 65] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 66] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 67] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 68] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 69] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 70] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 71] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 72] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 73] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 74] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 75] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 76] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 77] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 78] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 79] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 80] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 81] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 82] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 83] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 84] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 85] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 86] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 87] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 88] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 89] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 90] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 91] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 92] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 93] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 94] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 95] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 96] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 97] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 98] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 99] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[100] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[101] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[102] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[103] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[104] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[105] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[106] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[107] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[108] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[109] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[110] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3Any time I try to import a Python module, whether it’s from the standard library, installed, or custom, MATLAB crashed when I call py.importlib.import_module(). Here’s the crash log I get:
——————————————————————————–
abort() detected at Thu Jun 27 16:12:00 2019 -0400
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : ubuntu:GNOME
GNU C Library : 2.27 stable
Graphics Driver : Unknown hardware
Java Version : Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 5340214
MATLAB Root : /usr/local/MATLAB/R2018a
MATLAB Version : 9.4.0.813654 (R2018a)
OpenGL : hardware
Operating System : Ubuntu 18.04.2 LTS
Process ID : 72835
Processor ID : x86 Family 143 Model 1 Stepping 1, AuthenticAMD
Session Key : 0f3fa0ad-c4e3-4220-bbe7-b8df6cca1d4a
Static TLS mitigation : Disabled: Cannot load X11
Window System : The X.Org Foundation (12001000), display :0
Fault Count: 1
Abnormal termination
Register State (from fault):
RAX = 0000000000000000 RBX = 00007f805bff5860
RCX = 00007f80804a1e97 RDX = 0000000000000000
RSP = 00007f805bff55f0 RBP = 00007f805bff5960
RSI = 00007f805bff55f0 RDI = 0000000000000002
R8 = 0000000000000000 R9 = 00007f805bff55f0
R10 = 0000000000000008 R11 = 0000000000000246
R12 = 00007f805bff5860 R13 = 0000000000001000
R14 = 0000000000000000 R15 = 0000000000000030
RIP = 00007f80804a1e97 EFL = 0000000000000246
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f80804a1e97 /lib/x86_64-linux-gnu/libc.so.6+00257687 gsignal+00000199
[ 1] 0x00007f80804a3801 /lib/x86_64-linux-gnu/libc.so.6+00264193 abort+00000321
[ 2] 0x00007f80804ec897 /lib/x86_64-linux-gnu/libc.so.6+00563351
[ 3] 0x00007f80804f390a /lib/x86_64-linux-gnu/libc.so.6+00592138
[ 4] 0x00007f80804fae1c /lib/x86_64-linux-gnu/libc.so.6+00622108 cfree+00001228
[ 5] 0x00007f7e75d8456d /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406317 EVP_MD_CTX_reset+00000205
[ 6] 0x00007f7e75d8459a /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406362 EVP_MD_CTX_free+00000010
[ 7] 0x00007f7f0c002e87 /home/mlh6/anaconda3/lib/python3.7/lib-dynload/_hashlib.cpython-37m-x86_64-linux-gnu.so+00011911
[ 8] 0x00007f7e772140cc /home/mlh6/anaconda3/lib/libpython3.7m.so+00426188 _PyEval_EvalFrameDefault+00008396
[ 9] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 10] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 11] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 12] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 13] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 14] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 15] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 16] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 17] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 18] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 19] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 20] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 21] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 22] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 23] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 24] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 25] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 26] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 27] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 28] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 29] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 30] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 31] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 32] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 33] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 34] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 35] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 36] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 37] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 38] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 39] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 40] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 41] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 42] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 43] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 44] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 45] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 46] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 47] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 48] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 49] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 50] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 51] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 52] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 53] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 54] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 55] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 56] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 57] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 58] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 59] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 60] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 61] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 62] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 63] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 64] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 65] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 66] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 67] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 68] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 69] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 70] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 71] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 72] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 73] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 74] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 75] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 76] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 77] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 78] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 79] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 80] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 81] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 82] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 83] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 84] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 85] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 86] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 87] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 88] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 89] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 90] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 91] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 92] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 93] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 94] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 95] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 96] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 97] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 98] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 99] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[100] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[101] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[102] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[103] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[104] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[105] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[106] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[107] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[108] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[109] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[110] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3 Any time I try to import a Python module, whether it’s from the standard library, installed, or custom, MATLAB crashed when I call py.importlib.import_module(). Here’s the crash log I get:
——————————————————————————–
abort() detected at Thu Jun 27 16:12:00 2019 -0400
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : ubuntu:GNOME
GNU C Library : 2.27 stable
Graphics Driver : Unknown hardware
Java Version : Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 5340214
MATLAB Root : /usr/local/MATLAB/R2018a
MATLAB Version : 9.4.0.813654 (R2018a)
OpenGL : hardware
Operating System : Ubuntu 18.04.2 LTS
Process ID : 72835
Processor ID : x86 Family 143 Model 1 Stepping 1, AuthenticAMD
Session Key : 0f3fa0ad-c4e3-4220-bbe7-b8df6cca1d4a
Static TLS mitigation : Disabled: Cannot load X11
Window System : The X.Org Foundation (12001000), display :0
Fault Count: 1
Abnormal termination
Register State (from fault):
RAX = 0000000000000000 RBX = 00007f805bff5860
RCX = 00007f80804a1e97 RDX = 0000000000000000
RSP = 00007f805bff55f0 RBP = 00007f805bff5960
RSI = 00007f805bff55f0 RDI = 0000000000000002
R8 = 0000000000000000 R9 = 00007f805bff55f0
R10 = 0000000000000008 R11 = 0000000000000246
R12 = 00007f805bff5860 R13 = 0000000000001000
R14 = 0000000000000000 R15 = 0000000000000030
RIP = 00007f80804a1e97 EFL = 0000000000000246
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f80804a1e97 /lib/x86_64-linux-gnu/libc.so.6+00257687 gsignal+00000199
[ 1] 0x00007f80804a3801 /lib/x86_64-linux-gnu/libc.so.6+00264193 abort+00000321
[ 2] 0x00007f80804ec897 /lib/x86_64-linux-gnu/libc.so.6+00563351
[ 3] 0x00007f80804f390a /lib/x86_64-linux-gnu/libc.so.6+00592138
[ 4] 0x00007f80804fae1c /lib/x86_64-linux-gnu/libc.so.6+00622108 cfree+00001228
[ 5] 0x00007f7e75d8456d /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406317 EVP_MD_CTX_reset+00000205
[ 6] 0x00007f7e75d8459a /home/mlh6/anaconda3/lib/python3.7/lib-dynload/../../libcrypto.so.1.1+01406362 EVP_MD_CTX_free+00000010
[ 7] 0x00007f7f0c002e87 /home/mlh6/anaconda3/lib/python3.7/lib-dynload/_hashlib.cpython-37m-x86_64-linux-gnu.so+00011911
[ 8] 0x00007f7e772140cc /home/mlh6/anaconda3/lib/libpython3.7m.so+00426188 _PyEval_EvalFrameDefault+00008396
[ 9] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 10] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 11] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 12] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 13] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 14] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 15] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 16] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 17] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 18] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 19] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 20] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 21] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 22] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 23] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 24] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 25] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 26] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 27] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 28] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 29] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 30] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 31] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 32] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 33] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 34] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 35] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 36] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 37] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 38] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 39] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 40] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 41] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 42] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 43] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 44] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 45] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 46] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 47] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 48] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 49] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 50] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 51] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 52] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 53] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 54] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 55] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 56] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 57] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 58] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 59] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 60] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 61] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 62] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 63] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 64] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 65] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 66] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 67] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 68] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 69] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 70] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 71] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 72] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 73] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 74] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[ 75] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 76] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 77] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[ 78] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 79] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 80] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 81] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 82] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[ 83] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[ 84] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[ 85] 0x00007f7e772c9a2f /home/mlh6/anaconda3/lib/libpython3.7m.so+01169967 _PyFunction_FastCallDict+00000703
[ 86] 0x00007f7e772ca4c3 /home/mlh6/anaconda3/lib/libpython3.7m.so+01172675
[ 87] 0x00007f7e772ca76a /home/mlh6/anaconda3/lib/libpython3.7m.so+01173354 _PyObject_CallMethodIdObjArgs+00000186
[ 88] 0x00007f7e772fdea0 /home/mlh6/anaconda3/lib/libpython3.7m.so+01384096 PyImport_ImportModuleLevelObject+00001328
[ 89] 0x00007f7e77218f7a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446330 _PyEval_EvalFrameDefault+00028538
[ 90] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 91] 0x00007f7e773d436f /home/mlh6/anaconda3/lib/libpython3.7m.so+02261871 PyEval_EvalCodeEx+00000063
[ 92] 0x00007f7e772a3abc /home/mlh6/anaconda3/lib/libpython3.7m.so+01014460 PyEval_EvalCode+00000028
[ 93] 0x00007f7e772a790e /home/mlh6/anaconda3/lib/libpython3.7m.so+01030414
[ 94] 0x00007f7e772c9561 /home/mlh6/anaconda3/lib/libpython3.7m.so+01168737 _PyMethodDef_RawFastCallDict+00000769
[ 95] 0x00007f7e772c9be6 /home/mlh6/anaconda3/lib/libpython3.7m.so+01170406 _PyCFunction_FastCallDict+00000038
[ 96] 0x00007f7e77218d61 /home/mlh6/anaconda3/lib/libpython3.7m.so+00445793 _PyEval_EvalFrameDefault+00028001
[ 97] 0x00007f7e773d4284 /home/mlh6/anaconda3/lib/libpython3.7m.so+02261636 _PyEval_EvalCodeWithName+00002756
[ 98] 0x00007f7e772c9680 /home/mlh6/anaconda3/lib/libpython3.7m.so+01169024 _PyFunction_FastCallKeywords+00000144
[ 99] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[100] 0x00007f7e7721910a /home/mlh6/anaconda3/lib/libpython3.7m.so+00446730 _PyEval_EvalFrameDefault+00028938
[101] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[102] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[103] 0x00007f7e77214cb9 /home/mlh6/anaconda3/lib/libpython3.7m.so+00429241 _PyEval_EvalFrameDefault+00011449
[104] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[105] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[106] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[107] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3.7m.so+00450096
[108] 0x00007f7e7721b0f6 /home/mlh6/anaconda3/lib/libpython3.7m.so+00454902
[109] 0x00007f7e77216808 /home/mlh6/anaconda3/lib/libpython3.7m.so+00436232 _PyEval_EvalFrameDefault+00018440
[110] 0x00007f7e77219e30 /home/mlh6/anaconda3/lib/libpython3 python MATLAB Answers — New Questions
unable to iterate serially through files in a for loop
I am running a matlab for loop to iterate through 30 .csv files and 30 .xlsx files. At each iteration of the for loop, i expect matlab to read the days from the .xlsx file, pass it to the .csv file so the same days can be selected and then do the calculation in the code. The code runs well, but the files saved are not showing the correct answers like when the calculations are done individually for each .mat and .xlsx file at a time. Only the anwers in the first saved for loop file is correct, the others are not what i expect. it looks like matlab is skipping the files or mixing them up in the for loop iteration, as only the first iteration is correct. The files are arranged serially in my working folder, hence i expect the for loop to iterate serially. Attached here are some of three of the files. Also attached here is the code. Please the main point of concern are the for loops which iterates through the .xlsx and .csv files. Thank you.
startIndex = 1;
endIndex = 3;
startIndex1 = 1;
endIndex1 = 3;
filelist = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.csv’);
filelistt = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.xlsx’);
output1 = cell(31,1);
for fileidx = startIndex:endIndex
% for fileidx = 1:numel(filelist)
spectrum = readmatrix(filelist(fileidx).name);
% y = spectrum(2:end,1:4);
% ctm = cell2mat(y)
e = length(spectrum);
[F] = fillmissing(spectrum, ‘linear’);
for fileidx1 = startIndex1:endIndex1
% for fileidx1 = 1:numel(filelistt)
if fileidx == fileidx1
spectrum1 = readmatrix(filelistt(fileidx1).name);
% % trying to extract the 5 quiet days
yy1 = spectrum1(:,1);
% ctm1 = cell2mat(yy1);
rmn1 = F(:,1) == yy1;
sbd1 = F(rmn1, :);
df1 = sbd1(:,4);
dd = size(df1);
yy2 = spectrum1(:,2);
% ctm2 = cell2mat(yy2);
rmn2 = F(:,1) == yy2;
sbd2 = F(rmn2, :);
df2 = sbd2(:,4);
dd = size(df2);
yy3 = spectrum1(:,3);
% ctm3 = cell2mat(yy3);
rmn3 = F(:,1) == yy3;
sbd3 = F(rmn3, :);
df3 = sbd3(:,4);
dd = size(df3);
yy4 = spectrum1(:,4);
% ctm4 = cell2mat(yy4);
rmn4 = F(:,1) == yy4;
sbd4 = F(rmn4, :);
df4 = sbd4(:,4);
dd = size(df4);
yy5 = spectrum1(:,5);
% ctm5 = cell2mat(yy5);
rmn5 = F(:,1) == yy5;
sbd5 = F(rmn5, :);
df5 = sbd5(:,4);
dd = size(df5);
% concatenating of the 5 quiet days
c = [df1,df2,df3,df4,df5];
% mean along horz. line
cm = mean(c,2);
% mean for the entire column
cmm = mean(cm);
crp = repmat(cmm,24,1);
cmm1 = cm-crp;
cmm2 = cmm1.^2;
cmm3 = mean(cmm2);
cmm4 = sqrt(cmm3); %% this is the standard deviation
mc = cm’;
ee = e/24;
con = repmat(mc,1,ee);
cno = con’;
tyc = F(:,4);
tycc = tyc-cno
ty = F(:,1);
% concatenating the time column with the computed tec values.
yt = [ty,tycc];
elseif fileidx <= 10
save([‘C:UsersshedrDownloadstec data2017DOBUM2casc’, num2str(fileidx)],’yt’)
% elseif fileidx <= 20
% save([‘C:UsersshedrDownloadstec data2017DOBUM2frns’, num2str(fileidx)],’yt’)
% elseif fileidx <= 30
% save([‘C:UsersshedrDownloadstec data2017DOBUM2func’, num2str(fileidx)],’yt’)
% we = size(cno)
end
end
% output1{fileidx} = y;
endI am running a matlab for loop to iterate through 30 .csv files and 30 .xlsx files. At each iteration of the for loop, i expect matlab to read the days from the .xlsx file, pass it to the .csv file so the same days can be selected and then do the calculation in the code. The code runs well, but the files saved are not showing the correct answers like when the calculations are done individually for each .mat and .xlsx file at a time. Only the anwers in the first saved for loop file is correct, the others are not what i expect. it looks like matlab is skipping the files or mixing them up in the for loop iteration, as only the first iteration is correct. The files are arranged serially in my working folder, hence i expect the for loop to iterate serially. Attached here are some of three of the files. Also attached here is the code. Please the main point of concern are the for loops which iterates through the .xlsx and .csv files. Thank you.
startIndex = 1;
endIndex = 3;
startIndex1 = 1;
endIndex1 = 3;
filelist = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.csv’);
filelistt = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.xlsx’);
output1 = cell(31,1);
for fileidx = startIndex:endIndex
% for fileidx = 1:numel(filelist)
spectrum = readmatrix(filelist(fileidx).name);
% y = spectrum(2:end,1:4);
% ctm = cell2mat(y)
e = length(spectrum);
[F] = fillmissing(spectrum, ‘linear’);
for fileidx1 = startIndex1:endIndex1
% for fileidx1 = 1:numel(filelistt)
if fileidx == fileidx1
spectrum1 = readmatrix(filelistt(fileidx1).name);
% % trying to extract the 5 quiet days
yy1 = spectrum1(:,1);
% ctm1 = cell2mat(yy1);
rmn1 = F(:,1) == yy1;
sbd1 = F(rmn1, :);
df1 = sbd1(:,4);
dd = size(df1);
yy2 = spectrum1(:,2);
% ctm2 = cell2mat(yy2);
rmn2 = F(:,1) == yy2;
sbd2 = F(rmn2, :);
df2 = sbd2(:,4);
dd = size(df2);
yy3 = spectrum1(:,3);
% ctm3 = cell2mat(yy3);
rmn3 = F(:,1) == yy3;
sbd3 = F(rmn3, :);
df3 = sbd3(:,4);
dd = size(df3);
yy4 = spectrum1(:,4);
% ctm4 = cell2mat(yy4);
rmn4 = F(:,1) == yy4;
sbd4 = F(rmn4, :);
df4 = sbd4(:,4);
dd = size(df4);
yy5 = spectrum1(:,5);
% ctm5 = cell2mat(yy5);
rmn5 = F(:,1) == yy5;
sbd5 = F(rmn5, :);
df5 = sbd5(:,4);
dd = size(df5);
% concatenating of the 5 quiet days
c = [df1,df2,df3,df4,df5];
% mean along horz. line
cm = mean(c,2);
% mean for the entire column
cmm = mean(cm);
crp = repmat(cmm,24,1);
cmm1 = cm-crp;
cmm2 = cmm1.^2;
cmm3 = mean(cmm2);
cmm4 = sqrt(cmm3); %% this is the standard deviation
mc = cm’;
ee = e/24;
con = repmat(mc,1,ee);
cno = con’;
tyc = F(:,4);
tycc = tyc-cno
ty = F(:,1);
% concatenating the time column with the computed tec values.
yt = [ty,tycc];
elseif fileidx <= 10
save([‘C:UsersshedrDownloadstec data2017DOBUM2casc’, num2str(fileidx)],’yt’)
% elseif fileidx <= 20
% save([‘C:UsersshedrDownloadstec data2017DOBUM2frns’, num2str(fileidx)],’yt’)
% elseif fileidx <= 30
% save([‘C:UsersshedrDownloadstec data2017DOBUM2func’, num2str(fileidx)],’yt’)
% we = size(cno)
end
end
% output1{fileidx} = y;
end I am running a matlab for loop to iterate through 30 .csv files and 30 .xlsx files. At each iteration of the for loop, i expect matlab to read the days from the .xlsx file, pass it to the .csv file so the same days can be selected and then do the calculation in the code. The code runs well, but the files saved are not showing the correct answers like when the calculations are done individually for each .mat and .xlsx file at a time. Only the anwers in the first saved for loop file is correct, the others are not what i expect. it looks like matlab is skipping the files or mixing them up in the for loop iteration, as only the first iteration is correct. The files are arranged serially in my working folder, hence i expect the for loop to iterate serially. Attached here are some of three of the files. Also attached here is the code. Please the main point of concern are the for loops which iterates through the .xlsx and .csv files. Thank you.
startIndex = 1;
endIndex = 3;
startIndex1 = 1;
endIndex1 = 3;
filelist = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.csv’);
filelistt = dir(‘C:UsersshedrDownloadstec data2017DOBUM2*.xlsx’);
output1 = cell(31,1);
for fileidx = startIndex:endIndex
% for fileidx = 1:numel(filelist)
spectrum = readmatrix(filelist(fileidx).name);
% y = spectrum(2:end,1:4);
% ctm = cell2mat(y)
e = length(spectrum);
[F] = fillmissing(spectrum, ‘linear’);
for fileidx1 = startIndex1:endIndex1
% for fileidx1 = 1:numel(filelistt)
if fileidx == fileidx1
spectrum1 = readmatrix(filelistt(fileidx1).name);
% % trying to extract the 5 quiet days
yy1 = spectrum1(:,1);
% ctm1 = cell2mat(yy1);
rmn1 = F(:,1) == yy1;
sbd1 = F(rmn1, :);
df1 = sbd1(:,4);
dd = size(df1);
yy2 = spectrum1(:,2);
% ctm2 = cell2mat(yy2);
rmn2 = F(:,1) == yy2;
sbd2 = F(rmn2, :);
df2 = sbd2(:,4);
dd = size(df2);
yy3 = spectrum1(:,3);
% ctm3 = cell2mat(yy3);
rmn3 = F(:,1) == yy3;
sbd3 = F(rmn3, :);
df3 = sbd3(:,4);
dd = size(df3);
yy4 = spectrum1(:,4);
% ctm4 = cell2mat(yy4);
rmn4 = F(:,1) == yy4;
sbd4 = F(rmn4, :);
df4 = sbd4(:,4);
dd = size(df4);
yy5 = spectrum1(:,5);
% ctm5 = cell2mat(yy5);
rmn5 = F(:,1) == yy5;
sbd5 = F(rmn5, :);
df5 = sbd5(:,4);
dd = size(df5);
% concatenating of the 5 quiet days
c = [df1,df2,df3,df4,df5];
% mean along horz. line
cm = mean(c,2);
% mean for the entire column
cmm = mean(cm);
crp = repmat(cmm,24,1);
cmm1 = cm-crp;
cmm2 = cmm1.^2;
cmm3 = mean(cmm2);
cmm4 = sqrt(cmm3); %% this is the standard deviation
mc = cm’;
ee = e/24;
con = repmat(mc,1,ee);
cno = con’;
tyc = F(:,4);
tycc = tyc-cno
ty = F(:,1);
% concatenating the time column with the computed tec values.
yt = [ty,tycc];
elseif fileidx <= 10
save([‘C:UsersshedrDownloadstec data2017DOBUM2casc’, num2str(fileidx)],’yt’)
% elseif fileidx <= 20
% save([‘C:UsersshedrDownloadstec data2017DOBUM2frns’, num2str(fileidx)],’yt’)
% elseif fileidx <= 30
% save([‘C:UsersshedrDownloadstec data2017DOBUM2func’, num2str(fileidx)],’yt’)
% we = size(cno)
end
end
% output1{fileidx} = y;
end for loop, iteration MATLAB Answers — New Questions
Animating a 2-D Array as a function of time
Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks!Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks! Hi,
I’m trying to construct an animation for a 1200×8 array named ‘ppdtrace’ that returns the entire row data in a stepwise manner. I’m hoping to track the evolution of these data at points 1:8 across 1200 time steps. So, it would read in the data from row 1 and plot the return values along the y-plane with whole numbers [1:8] on the x-plane. What I have currently uses the animatedline function and plots it with:
h=animatedline(‘MaximumNumPoints’,100);
for i=1:1200
for l=1:8
addpoints(h,l,ppdtrace(i,l));
drawnow;
end
end
Which evolves as I was predicting, but I would prefer to have only data points denoted as ‘o’ , ‘x’ , or something of this manner, without the lines between. Is there a function that I can use to achieve this, or perhaps a command I can use to manipulate the animatedline function?
Alternatively, I would be fine with continuing to use animatedline if there was a way to prevent the function from connecting the data point at position 8 in the (n)th row with the data point at position 1 in the n+1 row.
Thanks! animation, animatedline MATLAB Answers — New Questions
Purely Explorative Acquisition Functions for bayesopt
Hello, I am trying to use Bayesian Optimization with the goal of learning the surrogate function as accurately as possible instead of its maximization. Essentially, I would like to use bayesopt, but with a purely explorative aquisition function like LCB with a high exploration constant (or without the mean entirely) or the Integrated Variance Reduction function described (not originally) here.
Is there any way to do this? I don’t see any documented way to modify the LCB function or use a custom aquisition function.Hello, I am trying to use Bayesian Optimization with the goal of learning the surrogate function as accurately as possible instead of its maximization. Essentially, I would like to use bayesopt, but with a purely explorative aquisition function like LCB with a high exploration constant (or without the mean entirely) or the Integrated Variance Reduction function described (not originally) here.
Is there any way to do this? I don’t see any documented way to modify the LCB function or use a custom aquisition function. Hello, I am trying to use Bayesian Optimization with the goal of learning the surrogate function as accurately as possible instead of its maximization. Essentially, I would like to use bayesopt, but with a purely explorative aquisition function like LCB with a high exploration constant (or without the mean entirely) or the Integrated Variance Reduction function described (not originally) here.
Is there any way to do this? I don’t see any documented way to modify the LCB function or use a custom aquisition function. bayesopt, acquisition function, matlab function MATLAB Answers — New Questions
How to test a function containing “waitfor” function without external user input?
I am testing my GUI functions. I am using Java functions in my test class to trigger mouse clicks. It will trigger a popup dialogue. Here the function pauses at the line of "waitfor". I have to manually click a button to close the dialogue, so the code running can continue. How can I make this process fully automatic?I am testing my GUI functions. I am using Java functions in my test class to trigger mouse clicks. It will trigger a popup dialogue. Here the function pauses at the line of "waitfor". I have to manually click a button to close the dialogue, so the code running can continue. How can I make this process fully automatic? I am testing my GUI functions. I am using Java functions in my test class to trigger mouse clicks. It will trigger a popup dialogue. Here the function pauses at the line of "waitfor". I have to manually click a button to close the dialogue, so the code running can continue. How can I make this process fully automatic? matlab test MATLAB Answers — New Questions
Calculate slope of groups of numbers in a table
Hi,
I have a table (data_all) with 4 columns.
Column 1 = identifies the group (identity)
Column 2 = time
Column 3 = x values
Column 4 = y values
I need to calculate the slopes of lines created by variables x and y within the groups defined by column 1.
I have been trying to use ‘polyfit’ with ‘varfun’ and ‘splitapply’. I can’t figure how to input 2 variables for a ‘varfun’ function. And the ‘splitapply’ gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
Codes I’ve been trying are below. I would appreciate any help with this!
Trying ‘varfun’ with mean which works but how do you use polyfit and 2 inputs?
data = ["x", "y"];
all_means = varfun(@mean, …
data, …
"InputVariables",data_all, …
"GroupingVariables","identity");
writetable(all_means,’all_means.xlsx’);
Trying ‘findgroups’ with ‘splitapply’. This gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
G = findgroups(data_all.identity)
%%
x = data_all.x
y = data_all.y
n = data_all.n %column of 1s
[slope, intercept] = splitapply(@polyfit,x,y,n,G);Hi,
I have a table (data_all) with 4 columns.
Column 1 = identifies the group (identity)
Column 2 = time
Column 3 = x values
Column 4 = y values
I need to calculate the slopes of lines created by variables x and y within the groups defined by column 1.
I have been trying to use ‘polyfit’ with ‘varfun’ and ‘splitapply’. I can’t figure how to input 2 variables for a ‘varfun’ function. And the ‘splitapply’ gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
Codes I’ve been trying are below. I would appreciate any help with this!
Trying ‘varfun’ with mean which works but how do you use polyfit and 2 inputs?
data = ["x", "y"];
all_means = varfun(@mean, …
data, …
"InputVariables",data_all, …
"GroupingVariables","identity");
writetable(all_means,’all_means.xlsx’);
Trying ‘findgroups’ with ‘splitapply’. This gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
G = findgroups(data_all.identity)
%%
x = data_all.x
y = data_all.y
n = data_all.n %column of 1s
[slope, intercept] = splitapply(@polyfit,x,y,n,G); Hi,
I have a table (data_all) with 4 columns.
Column 1 = identifies the group (identity)
Column 2 = time
Column 3 = x values
Column 4 = y values
I need to calculate the slopes of lines created by variables x and y within the groups defined by column 1.
I have been trying to use ‘polyfit’ with ‘varfun’ and ‘splitapply’. I can’t figure how to input 2 variables for a ‘varfun’ function. And the ‘splitapply’ gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
Codes I’ve been trying are below. I would appreciate any help with this!
Trying ‘varfun’ with mean which works but how do you use polyfit and 2 inputs?
data = ["x", "y"];
all_means = varfun(@mean, …
data, …
"InputVariables",data_all, …
"GroupingVariables","identity");
writetable(all_means,’all_means.xlsx’);
Trying ‘findgroups’ with ‘splitapply’. This gives an error of ‘unable to perform assignment because the indices on the left side are not compatible with the size of the right side.’
G = findgroups(data_all.identity)
%%
x = data_all.x
y = data_all.y
n = data_all.n %column of 1s
[slope, intercept] = splitapply(@polyfit,x,y,n,G); varfun, splitapply, polyfit MATLAB Answers — New Questions
Are the grayed-out tire parameter fields in the “Combined Slip Wheel 2DOF” block closed-source, and if not, how can they be accessed?
Hello,
I was looking into the block "Combined Slip Wheel 2DOF" and I noticed that selecting predefined models like "Light passenger car 205/60R15" or "Mid-size passenger car 235/45R18" results in most tire parameter fields being grayed out, with only a few editable unless the "load from external file" option is selected. Are these fields grayed out because the models are closed-source, and the parameter values are not publicly accessible? If they are publicly available, is there a way to access these values?Hello,
I was looking into the block "Combined Slip Wheel 2DOF" and I noticed that selecting predefined models like "Light passenger car 205/60R15" or "Mid-size passenger car 235/45R18" results in most tire parameter fields being grayed out, with only a few editable unless the "load from external file" option is selected. Are these fields grayed out because the models are closed-source, and the parameter values are not publicly accessible? If they are publicly available, is there a way to access these values? Hello,
I was looking into the block "Combined Slip Wheel 2DOF" and I noticed that selecting predefined models like "Light passenger car 205/60R15" or "Mid-size passenger car 235/45R18" results in most tire parameter fields being grayed out, with only a few editable unless the "load from external file" option is selected. Are these fields grayed out because the models are closed-source, and the parameter values are not publicly accessible? If they are publicly available, is there a way to access these values? vehicle dynamic blockset, simulink, tire MATLAB Answers — New Questions
How to turn off autosave in matlab online 2021a
It is so annoying and making my code slow. every time i change a small value and click run it takes time to save and then create .asv file and then run my code. Which is Soo annoying.
Please someone could help me how to turn it off.It is so annoying and making my code slow. every time i change a small value and click run it takes time to save and then create .asv file and then run my code. Which is Soo annoying.
Please someone could help me how to turn it off. It is so annoying and making my code slow. every time i change a small value and click run it takes time to save and then create .asv file and then run my code. Which is Soo annoying.
Please someone could help me how to turn it off. autosave, asv MATLAB Answers — New Questions
Arduino UNO R4 Minima support?
Hello, I was wondering if the Uno R4 Minima was supported hardware. I am having trouble with the hardware setup process, but wondering if anyone has had any luck successfully interfacing matlab/simulink to this board.
ThanksHello, I was wondering if the Uno R4 Minima was supported hardware. I am having trouble with the hardware setup process, but wondering if anyone has had any luck successfully interfacing matlab/simulink to this board.
Thanks Hello, I was wondering if the Uno R4 Minima was supported hardware. I am having trouble with the hardware setup process, but wondering if anyone has had any luck successfully interfacing matlab/simulink to this board.
Thanks arduino, uno r4 minima, hardware support package for arduino MATLAB Answers — New Questions