Cell arrays in MATLAB -


i know cell array is. came following line:

cell_array = cell([], 1); 

what mean? how can read above line?

thanks.

so makes 0x1 empty cell array. in literally 0 rows , 1 column. make 0x0 cell array this:

cell_array = {} 

which makes sense me. if can't preallocate before loop, it's useful concatenate onto or go cell_array(end) = ... in loop.

i don't know why you'd prefer 0x1 this question shows how differs 0x0. mean, if weird reason running loop on empty array know run @ least once :/ that's scraping barrel reason. think stick = {}.

edit:

as @radarhead points out, 1 way preset number of columns if plan on concatenating new rows in loop.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -