can expert here tell me wrong on code:
foldercontents=ls; foldercontents(1:2,:)=[]; nfoldercontents=size(foldercontents,1); i=1:nfoldercontents; [~, data] = hdrload(foldercontents(i,:)); if size(foldercontents(i,:),2)<size(foldercontents,2); temp=foldercontents(i,6:9); else temp=foldercontents(i,6:7); end temp1(i)=strread(temp); w=2*pi*(data([18 35 51 68],1)); permfreespace=8.854e-12; perm=data([18 35 51 68],3); cond=perm.*w.*permfreespace; conds([18 35 51 68],i)=cond; hold end figure(4);plot(temp1,conds);
the problem want plot these lines [18 35 51 68], see many lines. nfoldercontents equal 31
, when choose i=1:4
same problem. why ??
when matlab first time executes line
conds([18 35 51 68],i)=cond;
it creates array "conds" 68 rows , assign data 4-element vector "cond" rows 18,35,51,68 of i-th column of "conds". rest rows contain zeros. so, guess, in code see 4 lines interested in, , 64 lines along x-axis...
to solve problem should enough replace mentioned above line by
conds(:,i)=cond;
hopefully, have not missed ))
cheers,
//oleg
Comments
Post a Comment