Mex error while running a code matlab 2021a
Hi, i’m new to matlab so i can’t figure out where the error is. Could somone tell me how I can rectify it
I’m using this code which sombody had already made.
Thanks in advance
function Create_Data()
% This function creates the model data depicted in Figure 4-6 of
%
% Characterization of K-Complexes and Slow Wave Activity in a Neural Mass Model
% A Weigenand, M Schellenberger Costa, H-VV Ngo, JC Claussen, T Martinetz
% PLoS Computational Biology. 2014;10:e1003923
% Move to source folder(assuming it contains the Figures folder
cd ..;
% Check if the executable exists and compile if needed
if(exist(‘Cortex_mex.mesa64’, ‘file’)==0)
mex CXXFLAGS="$CXXFLAGS -std=c++11 -O3" Cortex_mex.cpp Cortical_Column.cpp;
end
% Add the path to the simulation routine
addpath(pwd);
% Go back into figures folder
cd Figures;
% Time series
Data_Time_Series(1);
Data_Time_Series(2);
% Time series
Data_Stimulation();
end
First I got this error
>> Create_Data
Building with ‘MinGW64 Compiler (C++)’.
Error using mex
g++: error: -fexceptions: No such file or directory
So, I put D:MatlabFilescortex_mex.cpp
>> D:MatlabFilescortex_mex.cpp
D:MatlabFilescortex_mex.cpp
↑
Invalid use of operator.
But it still said thisHi, i’m new to matlab so i can’t figure out where the error is. Could somone tell me how I can rectify it
I’m using this code which sombody had already made.
Thanks in advance
function Create_Data()
% This function creates the model data depicted in Figure 4-6 of
%
% Characterization of K-Complexes and Slow Wave Activity in a Neural Mass Model
% A Weigenand, M Schellenberger Costa, H-VV Ngo, JC Claussen, T Martinetz
% PLoS Computational Biology. 2014;10:e1003923
% Move to source folder(assuming it contains the Figures folder
cd ..;
% Check if the executable exists and compile if needed
if(exist(‘Cortex_mex.mesa64’, ‘file’)==0)
mex CXXFLAGS="$CXXFLAGS -std=c++11 -O3" Cortex_mex.cpp Cortical_Column.cpp;
end
% Add the path to the simulation routine
addpath(pwd);
% Go back into figures folder
cd Figures;
% Time series
Data_Time_Series(1);
Data_Time_Series(2);
% Time series
Data_Stimulation();
end
First I got this error
>> Create_Data
Building with ‘MinGW64 Compiler (C++)’.
Error using mex
g++: error: -fexceptions: No such file or directory
So, I put D:MatlabFilescortex_mex.cpp
>> D:MatlabFilescortex_mex.cpp
D:MatlabFilescortex_mex.cpp
↑
Invalid use of operator.
But it still said this Hi, i’m new to matlab so i can’t figure out where the error is. Could somone tell me how I can rectify it
I’m using this code which sombody had already made.
Thanks in advance
function Create_Data()
% This function creates the model data depicted in Figure 4-6 of
%
% Characterization of K-Complexes and Slow Wave Activity in a Neural Mass Model
% A Weigenand, M Schellenberger Costa, H-VV Ngo, JC Claussen, T Martinetz
% PLoS Computational Biology. 2014;10:e1003923
% Move to source folder(assuming it contains the Figures folder
cd ..;
% Check if the executable exists and compile if needed
if(exist(‘Cortex_mex.mesa64’, ‘file’)==0)
mex CXXFLAGS="$CXXFLAGS -std=c++11 -O3" Cortex_mex.cpp Cortical_Column.cpp;
end
% Add the path to the simulation routine
addpath(pwd);
% Go back into figures folder
cd Figures;
% Time series
Data_Time_Series(1);
Data_Time_Series(2);
% Time series
Data_Stimulation();
end
First I got this error
>> Create_Data
Building with ‘MinGW64 Compiler (C++)’.
Error using mex
g++: error: -fexceptions: No such file or directory
So, I put D:MatlabFilescortex_mex.cpp
>> D:MatlabFilescortex_mex.cpp
D:MatlabFilescortex_mex.cpp
↑
Invalid use of operator.
But it still said this mex compiler, mex error MATLAB Answers — New Questions