Some mathematical software has a command to give the total number of seconds of CPU time used and the total number of seconds since the beginning of computation in the session such as the commands TimeUsed and AbsoluteTime in Mathematica, respectively, and the commands cputime
and tic/toc in Matlab, respectively.
At the same time, the MATLAB function "cputime
" can be used to calculate the running time of the program, which is to measure the running speed and performance of the program.
tl = cputime
; orgpath=path; try path(orgpath,genpath('Subfunctions')); guessinit; %User Defined Parameters guessread; %Load, and process weather data guessmodel; %Execute Simulink model guessoutput; %Display results t2 = cputime
; t3 = t2-tl; catch err path(orgpath); rethrow(err); end path(orgpath); fprintf('Model took %4.2f seconds to execute\n', t3); 5 Modeling of the fuzzy controller
MATLAB can observe the output of algorithms through a CPUTIME
. The FMCW chirp parameters used in the preceding section for Monte-Carlo simulations are applied to assess the computation complexity in the same manner.
Simulation experiments are conducted on MATLAB and the average execution time is evaluated by means of the cputime
and tic-toc function.
[beta] = 1.3 [beta] = 1.7 [beta] = 1.7 [beta] = 1.9 [n.sub.x] [n.sub.y] it (CPUtime
) it (CPUtime
) 1024 1024 2.3 (19.35) 2.5 (15.01) 1024 2048 2.8 (47.17) 2.9 (22.25) 2048 2048 3.0 (76.72) 2.6 (36.01) 4096 4096 3.0 (171.30) 2.6 (199.82) Constant Coeff.
The experimental results are shown in Table 2, where dividing and reconstructing in our proposed solution are corresponding to the encryption and decryption procedures in existing work respectively, and "s" (i.e., "second") is the execution cputime
. The processing time in our solution, especially the time on dividing the document into shares and searching are less than the processing time on encrypting the document and searching in existing work.
In Figures 11-14 we compare different settings of incr-ls by plots of the average total area versus the CPUtime
on four high-level synthesis benchmarks including Fast fourier transform, FIR filter (band pass filter), fifth order elliptical wave filter and discrete cosine transform.
The processing time for each of the implemented algorithms was measured by CPUTIME
of MATLAB through the start-time and the endtime of the processor.
The numbers, PGN, RN, and CPUTIME
denote the final projected gradient norm [[parallel][[nabla].sup.P]Q([X.sup.k])[parallel].sub.F], the final value of [[parallel]B - [AX.sup.k][parallel].sub.F], and the CPU time used at the termination of each algorithm, respectively.
In Figure 7.3 we present timings, related to the cputime
needed by one processor, in case of the standard QR-factorization and by two processors in case the algorithm is run in parallel.
The running times are measured using Matlab's cputime
command, and these measurements are given in Tables 5.6 and 5.7 in units of seconds.