how can we preallocate a 2d array?

조회 수: 13 (최근 30일)
shana
shana 2013년 3월 31일
답변: José Jines 2023년 1월 23일
there is a warning in my program, it says that the variable is growing inside a loop. so consider pre allocation for speed

답변 (2개)

Razvan
Razvan 2013년 3월 31일

José Jines
José Jines 2023년 1월 23일
Hi,
I am trying to solve this equation:
q_rad_L(i,j)=(ew./(a_g_p+ew-a_g_p).*ew).*thau.*(e_g_p.*T_ini.^4 -a_g_p.*T_iw.^4).*(a_hat./(x(i)-x(i-1)));
I want to solve to some values: i=1:15, j=1:15 into a loop.
I will appreciate for any response.
Josh

카테고리

Help CenterFile Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by