Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sim = spectralradiusSORfile(a,b,step)
- % Denne funksjonen skriver data til seks filer som allerede er bestemt på
- % forhånd, av hvor mange verdier mellom 0 og 4pi^2 vi vil ta.
- format long
- c = a:step:b;
- d = length(c);
- e = 0.2:0.2:1.8;
- f = length(e);
- V = zeros(f,d);
- fid1 = fopen('SOR1.asc','w');
- fid2 = fopen('SOR2.asc','w');
- fid3 = fopen('SOR3.asc','w');
- fid4 = fopen('SOR4.asc','w');
- fid5 = fopen('SOR5.asc','w');
- fid6 = fopen('SOR6.asc','w');
- fid = [{'SOR1.asc'},{'SOR2.asc'},{'SOR3.asc'},{'SOR4.asc'},{'SOR5.asc'},{'SOR6.asc'}];
- g = (4*pi^2)/6:(4*pi^2)/6:(4*pi^2);
- h = length(g);
- for i = 1:h
- V = spectralradiusSOR(a,b,step,0.2,1.8,0.2,g(i));
- dlmwrite(fid{i},V,'precision','%.40f');
- end % for
- sim = fclose('all');
- end % function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement