how can we preallocate a 2d array?

16 Ansichten (letzte 30 Tage)
shana
shana am 31 Mär. 2013
Beantwortet: José Jines am 23 Jan. 2023
there is a warning in my program, it says that the variable is growing inside a loop. so consider pre allocation for speed

Antworten (2)

Razvan
Razvan am 31 Mär. 2013

José Jines
José Jines am 23 Jan. 2023
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

Kategorien

Mehr zu Quadratic Programming and Cone Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by