Ndisvec=[.5 2 8 32 128]*10^11; %Set of density values
figure(1025)clf(1025)figure(1025)hold onset(gca, 'XScale', 'log', 'YScale', 'log')%Riemann sum
x=[0:0025:1-.005];I=[1:length(kf)];for z=1:length(kf);kfh=kf(z);y=((x+(qtf/(2*kfh))).^2.*sqrt(1-x.^2)).^-1;I(z)=sum(y)*.0025;endfor z=1:length(Ndisvec) Ndis=Ndisvec(z); tau=hb^3*(epo*epb*co)^2/(Ndis*meff*e^4*f^2)*16*pi*kf.^4./(I*sqrt(2)); muDIS1=e*tau/meff;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loglog(n(1,:)*10^-15,muDIS1(1,:)); %deleted 10^-4
endfigure(1025)
I need to print the values of muDIS1 into a new column for each iteration of the for loop (it will run 5 times). At the end i need an asc file which will have columns of data. I have been playing around with the fopen/fprintf functions but have had no luck. I made a for loop—– for muDIS1(z) and the fprintf just under muDIS1 fclose after i end the loop that didnt work
Best Answer