| Tips | Tip / 사용기를 올려 주세요. |
Read : 111, Vote : 0, Date : 2001-04-14 21:19:42 |
|
||||||||||||
![]() |
|||||||||||||
|
|||||||||||||
|
% 이 파일을 매트랩 m파일 에디터에서 gbench.m로 \matlab\bin 디렉토리 밑에 저장한후
% Command 창에서 gbench 라고 실행하면 OK. % % function GromitBench % 2001.4.13 clear clc disp('Matlab5.1 benchmark') disp('Gromit Park, 2001.4') f='%7.3f\n'; fprintf('1. Empty Loop, 5000000 times: ') m=5000000;; tic for i=1:m, end t=toc; fprintf(f,t) fprintf('2. LU Cholsky 500x500, 5times: ') n=500;m=5; A=ones(n)+eye(n); tic for i=1:m,R=chol(A); end t=toc; fprintf(f,t) fprintf('3. Sparse matrix, 500x101 : ') n=500;m=50;k=10; B=ones(n,2*m+1); B(:,m+1)=m+1; d=[-m:m]; tic A=spdiags(B,d,n,n); R=chol(A); R=A-R'*R; t=toc; fprintf(f,t) fprintf('4. 2D FFT, 512x512 Float, 5 times : ') n=512;m=5; A=peaks(n); tic for i=1:m,FA=FFT2(A); end t=toc; fprintf(f,t) fprintf('5. Transpose matrix, 512x512 Float, 10 times : ') n=512;m=10; A=FA; tic for i=1:m,AT=A'; end t=toc; fprintf(f,t) fprintf('6. Inverse matrix, 512x512 Integer : ') n=512; A=rand(n); tic for i=1:1,AI=inv(A); end t=toc; fprintf(f,t) fprintf('7. 2D Sinusoidal Plot, 50 times : ') n=50; tic figure(1) for i=1:n clf x=0:0.01:5; % Line plot of a chirp y=sin(x.^2); plot(x,y), Grid; drawnow end t=toc; fprintf(f,t) fprintf('8. 3D Surfl, 24x24, 20 times : ') n=20; tic for i=1:n z=peaks(24); % Surface Plot (with Shading) of Peaks surf(z); view(i+30,30); drawnow end t=toc; fprintf(f,t) fprintf('9. Image Histo Equalize , 205x232 unit8, 10 times : ') n=10; tic for i=1:n I = imread('tire.tif'); J = histeq(I); figure(1),imagesc(I) figure(2), imagesc(J) drawnow end t=toc; fprintf(f,t) clf clear |
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|
|   |
|
|
|
|
|
|
||||||
![]() |
Gromit | [부록] Matlab 벤치마킹 프로그램 임다. |
01/04/14 | 111 | 0 | ||||||
| 서상혁 | [RE] [부록] Matlab 벤치마킹 프로그램 ... |
01/04/15 | 47 | 0 | |||||||
| Gromit | [RE] [부록] Matlab 벤치마킹 프로그램 ... |
01/04/16 | 25 | 0 | |||||||
| ⓒ 2001 zetyx.com / Skined by ZeZZ.com |