Find the modelsim.ini file in the install path, and Change "VoptFlow" parameter to false in the file.
[vsim]
; vopt flow
; Set to turn on automatic optimization of a design.
; Default is on
VoptFlow = 0
Capricorn Liver
save('./dat/bpnn_00.mat', 'bpnn'); % | file name | nn obj | // it`s easy.
newData1 = load('-mat', './dat/bpnn_00.mat'); % transfer variable format vars = fieldnames(newData1); for i = 1:length(vars) assignin('base', vars{i}, newData1.(vars{i})); end
nnResult = sim(bpnn, nnInput); % nnResult is error value
nnWB = getx(bpnn); % <-- why? nnResult = sim(bpnn, nnInput); % nnResult is correct value