matlab - Adding vectors with sequential names to a table using a for-loop -


i have vectors (each 1 row , 13 columns) named sequentially (values.val0001, values.val0002, etc.), trying input of these vectors rows in 1 table using follwing code:

for = 1:50;     j = sprintf('%04d', i); m = []; m =[m; values.(['val' j])]; end 

the above code produce table first row (i.e. values.val0001) , wouldnt input sequentialy named vectors (i.e. values.val0002, values.val0003) subsequent rows intend.

you should move row m = [] out of loop, otherwise reset variable m each time


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -