Adding large data sets within a for loop in matlab -
i'm attempting make basic gating system, smallest data have single cycle equals 18*100 array. i've attempted plotting hold on/off function , collecting data after h=findobj(gca,'type','line');
. takes forever , requires lot of reshaping. there simpler way either store data or add complete arrays (not sum line line no-no) in loop?
h=findobj(gca,'type','line'); %data retrieved orginal figure x=get(h,'xdata'); y=get(h,'ydata'); x=reshape(x,(18),[]); y=reshape(y,(18),[]); hold on i=1:4; xx=x(:,i); yy=y(:,i); gx=cell2mat(xx); gy=cell2mat(yy); plot(gx) % manipulated data orginal figure, plot(gy) % plot required extract loop data end hold off
basically want add 4 gx
, divide them, have added bulk, not line line 1 cycle of loop equals cycle of system. (also 4 number more 60+, why can't manually).
many thanks!
Comments
Post a Comment