matlab - Save .Mat in Every Iterations -


im working on simulation dehumidification process, should save .mat file in every loop, program flowchart is:

enter code here   m=9:2:21    kk=1:ll     jj=1:mm       ii=1:nn             ...            ...            ...        end     end  end       a=min(x-y)    end 

for example mm=9 a=1 mm=11 a=2 ..., how can plot mm? , how can save .mat file in every mm iteration? thanks.

blockquote %a=(7*1)matrix %9:2:21=7(number)

if want save .mat-file each iteration thing need generate unique filename each iteration within loop. can done using format strings, instance in case like

    filename = sprintf('output_kk=%d_jj=%d_ii=%d.mat', [kk jj ii]);     save(filename); 

you have option save specific variables adding them options save command. more string formatting i'd suggest check out sprintf documentation.

i'm not sure whether efficient way it. depending on number , size of output variables you're interested in can create cell structure , save data new cell each iteration.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -