COBRA cannot read .xml model

조회 수: 7 (최근 30일)
Loc
Loc 2025년 9월 18일
댓글: Walter Roberson 2025년 9월 18일
I downloaded a xml model into matlab, and installed COBRA but I cannot load the model

채택된 답변

Walter Roberson
Walter Roberson 2025년 9월 18일
size() returns a vector with at least two elements. Historically, the colon operator ignored everything except the first element of its inputs, but as of R2025a (I think it was) the colon operator starts erroring when given non-scalar inputs.
The code needs to be changed to
for i = 1:size(relarray,1)
for compatibility with previous use.
It would not surprise me if relarray could end up being a row vector though, so potentially length(relarray) might be better than size(relarray,1), perhaps.
  댓글 수: 2
Loc
Loc 2025년 9월 18일
I tried to fix that but when I try to print this happens, should I switch to a lower version?
Walter Roberson
Walter Roberson 2025년 9월 18일
There does not appear to be any function named print in the COBRA Toolbox. https://opencobra.github.io/cobratoolbox/stable/modules/index.html
As a result, you are invoking the MATLAB print function which is intended to output graphics objects.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Import Data에 대해 자세히 알아보기

제품


릴리스

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by