0

I've used fitnlm() in a loop to create a cell array of nonlinear models. and saved said cell array like this:

for i=1:N
    modelfun =  @(b,x)model_func_3(b,x,n);
    inital_b = rand((n+1)*(n+2)/2,2)
    model_array{i} = fitnlm(center_ptsSet(:),center_ptsRef(:),modelfun,inital_b);
end;
save('some_path.mat',model_array);

where model_func_3 is just a simple function and center_ptsSet,center_ptsRef are MX1 data sets now when I want to load said cell array by dragging into MATLAB or by using load() its stuck on 'busy'

does anyone know why? or what I did wrong?

  • Perhaps its just big and take time to load.... The code you show should work. At the same time, this is not the code you are actually running, so who knows if there is a bug – Ander Biguri Feb 01 '18 at 13:55
  • 1. it's not that big ~9MB 2. you are right, I re-edited the code to look more like mine – Daniel Roth Feb 01 '18 at 14:28
  • There should not be any problem loading/saving any MATLAB type. If there is, either you are saving it wrong (e.h. with a typo in the extension) or your MATLAB is broken – Ander Biguri Feb 01 '18 at 14:33
  • the problem description is incomplete since we don't have the data and rest of code are used here. – Mohammad nagdawi Feb 03 '18 at 00:34

0 Answers0