error in arExportSBML
rosewu opened this issue · 3 comments
Hi, I would like to export my ODEs to SBML files. I did it as following:
arInit;
arLoadModel;
arCompileAll;
arExportSBML(1,1)
however, I got the error:
Index exceeds matrix dimensions.
Error in arExportSBML (line 240)
M.reaction(vcount).reversible = ar.model(m).reversible(jv);
Then I checked the ar.model(1).reversible=[];
Could you please kindly give me some hints to solve it?
Thank you very much!
Hi,
I just pushed a commit that should solve this issue.
The problem is that empty initialization of the field 'reversible' was recently added.
In arExportSBML this was not captured and 0 was only filled if the field didn't exist at all.
Please tell me if the export is still failing.
Best
Helge
The same situation at line 249. I rectified it as followed:
if(isfield(ar.model(m),'v') && ~isempty(ar.model(m).v))
% if(isfield(ar.model(m),'v') && ~isempty(ar.model(m).v{jv}))
oh ok, there might be a bunch of if statements that are outdated because we had changes in the ar struct. I will change line 249 as well.
Thanks a lot for your help!