Differences

This shows you the differences between two versions of the page.

oct [2012/01/29 17:20]
darko.antonijevic
oct [2012/01/29 17:21] (current)
darko.antonijevic
Line 90: Line 90:
fprintf(fin,'\n'); fprintf(fin,'\n');
end end
 +fclose(fin);
 +</file>
 +
 +Druga skripta resava problem zadatka:
 +
 +<file m zad2_main.m>
 +A = load('matrica.txt');
 +
 +fin = fopen('odstupanje.txt','w');
 +
 +
 +for i = 1:size(A,2),
 + minimum = min(A(:,i));
 + maksimum = max(A(:,i));
 + srednja = sum(A(:,i))/size(A,1);
 + odst = abs(srednja - (maksimum+minimum)/2);
 + fprintf(fin,'%f ', odst);
 +end
 +
fclose(fin); fclose(fin);
</file> </file>
 
oct.txt · Last modified: 2012/01/29 17:21 by darko.antonijevic
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki