How to save a variable in the same mat.file each time a function runs?
1 次查看(过去 30 天)
显示 更早的评论
I have a matlab function which runs in combination with BCI2000. I want to save a variable each time the function re-runs to do the calculations for the BCI server (real-time monitoring).
I tried something like this:
pp = 1; %begin point
variab= [];
for i= 1:1000
np(i) = pp + size(out_signal(i),1)-1; %next point
variable_new = [out_signal]
variab = [variab variable_new];
%variable(i) = [pp,]; % X moet je nog even bedenken hoe dat zit met variabelen/cells etc.
%(pp:np,:) voor size(A,2)>1
pp = np +1;
end
save ('variable.mat','variab')
This does not work. How can I save the outcome signal each time the function runs?
1 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!