Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Size of cell changes when calling it from a function?

조회 수: 1 (최근 30일)
Joel Schelander
Joel Schelander 2021년 4월 28일
마감: Jan 2021년 4월 28일
I am calling a function like this:
for z=1:3
if z==1
[GUD,GUDID]=H1(ID2,HHPerson,nBEV,BEV,x,Hcombos,Household,sample,A);
end
if z==2
[GUD,GUDID]=H2(ID2,HHPerson,nBEV,BEV,x,Hcombos,Household,sample,A);%run('H2')
end
if z==3
[GUD,GUDID]=H3(ID2,HHPerson,nBEV,BEV,x,Hcombos,Household,sample,A);
end
save(sprintf('Allv/Alla/AAG%d',z), 'GUD');
The output "GUD" should always be 1000 doubles of the size 1x1000. But the output for z==3 is
1x798 double 1x766 double 1x767 double 1x763 double
I have checked by debugging in the function H3, it constructs GUD with a 1x1000 double at a time, but it is when I am calling the function that it gets wrong.

답변 (0개)

이 질문은 마감되었습니다.

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by