Error using getByteStreamFromArray, Error during serialization
94 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clear all; clc; tic;
sbioloadproject PROJ.sbproj;
repeat = 1;
period = 20;
input = fix(5*rand(5,1));
for i = 1:repeat
sbioaccelerate(m1);
t = [0]; sd = [0];
for j = 1:numel(input)
cAMP_sensor_data = [];
if input(j) >= 1
m1.Parameters(12).Value = 120000;
m1.configset.StopTime = period;
[time,simdata,names] = sbiosimulate(m1);
for k = 1:size(names)
m1.Species(k).Value = simdata(end,k);
end
t = [t;t(end)+time];
cAMP_sensor_data = simdata(:,9);
sd = [sd;cAMP_sensor_data];
toc;
end
if input(j) == 0
m1.Parameters(12).Value = 0;
m1.configset.StopTime = period;
[time,simdata,names] = sbiosimulate(m1);
for k = 1:size(names)
m1.Species(k).Value = simdata(end,k);
end
t = [t;t(end)+time];
cAMP_sensor_data = simdata(:,9);
sd = [sd;cAMP_sensor_data];
toc;
end
end
figure,plot(t,sd,'m'); hold on;
title('random input');
ylim([0,((max(sd)/100)+1)*100]);
xlabel('time'); ylabel('intensity');
end
for j = 1:numel(input)
plot([j*period,j*period],[0,max(sd)],'r--');
end
SOMETIMES GOOD,EVERYTHINF IS FINE, BUT SOMETIMES RETURN THIS. BUT THE STORAGE IS FINE,THE DATA IS FINE, ONLY CANNOT PLOT. NEED HELP!!!
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using getByteStreamFromArray
Error during serialization
Error in matlab.internal.editor.figure.SerializedFigureState/serialize
Error in matlab.internal.editor.FigureProxy/createWebFigureSnapshot
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.saveSnapshot
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
0 Kommentare
Antworten (1)
Bala Tripura Bodapati
am 29 Sep. 2022
Hi Shengjie
It is my understanding that the following error is encountered while plotting the data in Live Editor:
Error using getByteStreamFromArray
As a workaround, you can add the following command immediately after your plotting command(s):
>> uicontrol('Visible','off')
This will prevent the figure from being serialized and hence prevent the error. Note, though, that this will cause the figure to be displayed in both, Live Script and in a new figure window.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Scan Parameter Ranges finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!