Hi
Can anyone tell me how can I fix this preallocation problem in matlab.
Thanks!
fluid_HX = struct;
for j=1:length(t)
fluid_HX{j}=refprop(v(j),T_in(j),r410a);
end

댓글 수: 1

KSSV
KSSV 2019년 4월 23일
YOu have initialized fluid_HX as a structure. Read about structures...it needs some field value.
If you want a cell initialize it as a cell.

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

 채택된 답변

KSSV
KSSV 2019년 4월 23일

0 개 추천

fluid_HX = cell(length(t),1);
for j=1:length(t)
fluid_HX{j}=refprop(v(j),T_in(j),r410a);
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

질문:

2019년 4월 23일

댓글:

2019년 4월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by