In order to display the start execution time of programme, you can add following matlab code in beginning or end of your .m file. % cur_date = date; cur_time = fix(clock); str = sprintf('%s %.2d:%.2d:%.2d\n', cur_date, cur_time(4), cur_time(5),cur_time(6)); disp( ) %
Date Object Methods 日期对象方法 FF : Firefox, N : Netscape, IE : Internet Explorer FF:火狐,N:网景,IE Method 方法 Description 描述 FF N IE Date() Returns today's date and time 返回今天的日期和时间 1 2 3 getDate() Returns the day of the month from a Date object (from 1-31) 返回月中的第几天(1到31) 1 2 3 getDay() Returns the day of the week from a Date object (from 0-6) 返回一周中的第几天(0到6) 1 2 3 getMonth() Returns the month from a Date object (from 0-11) 返回月份数(0到11) 1 2 3 getFullYear() Returns the year, as a four-digit number, from a Date object 返回完整的年份数 1 4 4 getYear() Returns the year, as a two-digit or a four-digit number, from a Date object. Use getFullYear() instead !! 返回年份,可以是两位的或是四位的 1 2 3 getHours() Returns the hour of a Date object (from 0-23) 返回日期对象的小时数(0到23) 1 2 3 getMinutes() Returns the minutes of a Date object (from 0-59) 返回日期对象的分钟(0到59) 1 2 3 getSeconds() Returns the seconds of a Date object (from 0-59) 返回日期对象的秒(0到59) 1 2 3 getMilliseconds() Returns the milliseconds of a Date object (from 0-999) 返回毫秒(0到999) 1 4 4 getTime() Returns the number of milliseconds since midnight Jan 1, 1970 从1970年1月1号午夜到现在一共花去的毫秒数 1 2 3 getTimezoneOffset() Returns the difference in minutes between local time and Greenwich Mean Time (GMT) 本地时间和GMT相差多少分钟 1 2 3 getUTCDate() Returns the day of the month from a Date object according to universal time (from 1-31) 依据国际时间来得到月中的第几天(1到31) 1 4 4 getUTCDay() Returns the day of the week from a Date object according to universal time (from 0-6) 依据国际时间来得到现在是星期几(0到6) 1 4 4 getUTCMonth() Returns the month from a Date object according to universal time (from 0-11) 依据国际时间来得到月份(0到11) 1 4 4 getUTCFullYear() Returns the four-digit year from a Date object according to universal time 依据国际时间来得到完整的年份 1 4 4 getUTCHours() Returns the hour of a Date object according to universal time (from 0-23) 依据国际时间来得到小时(0-23) 1 4 4 getUTCMinutes() Returns the minutes of a Date object according to universal time (from 0-59) 依据国际时间来返回分钟(0到59) 1 4 4 getUTCSeconds() Returns the seconds of a Date object according to universal time (from 0-59) 依据国际时间来返回秒(0到59) 1 4 4 getUTCMilliseconds() Returns the milliseconds of a Date object according to universal time (from 0-999) 依据国际时间来返回毫秒(0到999) 1 4 4 parse() Takes a date string and returns the number of milliseconds since midnight of January 1, 1970 或得并返回自1970年1月1号凌晨到现在一共花掉了多少毫秒 1 2 3 setDate() Sets the day of the month in a Date object (from 1-31) 设置日 1 2 3 setMonth() Sets the month in a Date object (from 0-11) 设置月 1 2 3 setFullYear() Sets the year in a Date object (four digits) 设置年份 1 4 4 setYear() Sets the year in the Date object (two or four digits). Use setFullYear() instead !! 用setFullYear()来取代 1 2 3 setHours() Sets the hour in a Date object (from 0-23) 设置小时 1 2 3 setMinutes() Set the minutes in a Date object (from 0-59) 设置分钟 1 2 3 setSeconds() Sets the seconds in a Date object (from 0-59) 设置秒 1 2 3 setMilliseconds() Sets the milliseconds in a Date object (from 0-999) 设置毫秒 1 4 4 setTime() Calculates a date and time by adding or subtracting a specified number of milliseconds to/from midnight January 1, 1970 1 2 3 setUTCDate() Sets the day of the month in a Date object according to universal time (from 1-31) 依据国际时间来设置日期 1 4 4 setUTCMonth() Sets the month in a Date object according to universal time (from 0-11) 依据国际时间来设置月 1 4 4 setUTCFullYear() Sets the year in a Date object according to universal time (four digits) 依据国际时间来设置年份 1 4 4 setUTCHours() Sets the hour in a Date object according to universal time (from 0-23) 依据国际时间来设置小时 1 4 4 setUTCMinutes() Set the minutes in a Date object according to universal time (from 0-59) 依据国际时间来设置分钟 1 4 4 setUTCSeconds() Set the seconds in a Date object according to universal time (from 0-59) 依据国际时间来设置秒 1 4 4 setUTCMilliseconds() Sets the milliseconds in a Date object according to universal time (from 0-999) 依据国际时间来设置毫秒 1 4 4 toSource() Represents the source code of an object 显示对象的源代码 1 4 - toString() Converts a Date object to a string 将日期对象转换为字符串 1 2 4 toGMTString() Converts a Date object, according to Greenwich time, to a string. Use toUTCString() instead !! 根据格林威治时间将Date 对象转换为一个字符串。可以使用toUTCString()替代这种方法 1 2 3 toUTCString() Converts a Date object, according to universal time, to a string 根据通用时间将一个Date 对象转换为一个字符串 1 4 4 toLocaleString() Converts a Date object, according to local time, to a string 根据本地时间将一个Date 对象转换为一个字符串 1 2 3 UTC() Takes a date and returns the number of milliseconds since midnight of January 1, 1970 according to universal time 根据通用时间将日期计算为从1970年1月1日午夜至今所经过的时间(单位:毫秒) 1 2 3 valueOf() Returns the primitive value of a Date object 返回日期对象的原始值 1 2 4
Here Irecommenda free file sync tool:DirSync Pro which works under Linux, Windows and macOS. Although it based on JAVA, it is stillamazingfast when sync files between local disk and USB hard disk. Download link: http://www.dirsyncpro.org/download.html DirSync Pro is designed and developed by O. Givi. DirSync Pro is based on DirSync (Directory Synchronize) by E. Gerber and F. Gerbig. (C) 2008-2012 O. Givi (C) 2002-2008 by E. Gerber, F. Gerbig and T. Groetzner. Thanks to M. Lux, G. Noorlander, T. Brixel, D. Caravana, R. Williams, and D. Petre. This program comes with ABSOLUTELY NO WARRANTY; It is licensed according to GPL v3. Features Synchronization Powerful synchronization algorithm. Bi-directional (Two way) and mono-directional (One way) synchronization mode. Predefined synchronzation modes for mostly used synchronizations Mirror A - B (incremental): Mirrors new and modified files from A to B. Mirror B - A (incremental): Mirrors new and modified files from B to A. Synchronize A - B (incremental): Mirrors new and modified files in directories A and B to each other. Backup A - B (full): Makes a full copy of directory A into directory B. Restore B - A (full): Makes a full copy of directory B into directory A. Contribute A - B (incremental): Mirrors only new files from directory A into directory B. Contribute B - A (incremental): Mirrors only the new files from directory B into directory A. Synchronize A - B (custom): Custom mode to synchronize directory A into directory B with all advanced options. Synchronize B - A (custom): Custom mode to synchronize directory B into directory A with all advanced options. Highly customizable custom synchronization modes. Option for various behavior of conflict resolution for Bidirectional Synchronization. Synchronizes unlimited number of files and folders. Large number of options to change the synchronization behavior. Option to synchonise subdirectories recursively. Synchronizes files/folders any file system (FAT, FAT16, FAT32, NTFS, WinFS, UDF, Ext2, Ext3, ...). Synchronizes files from/to network drives Synchronizes files from/to any mounted devices (Harddisks, USB-Sticks, Memory cards, External drives, CD/DVD's, ...). Synchronization could be used for making incremental backups. Option to create up to 50 backups from the modified/changed files before synchronization. Option to define a backup folder where DirSync Pro keeps tracks of files which are being overwritten. Option for handling symbolic links. Advanced options for handling time-stamps. Option to define timestamp granularity. Option to handle 'daylight saving' related timestamp granularity (useful when syncing with FAT file systems). Option to preserve DOS attributes when synchoronizing (DOS/Windows only). Option to preserve file ownerships (user and group, POSIX only). Option to preserve file permissions (POSIX systems only). Schedule Engine DirSync Pro has a powerful Schedule Engine with lots of features to run automated scheduled synchronzation tasks. Once: Run sync tasks at a certain time in the future. Minutely: Run sync tasks recurrently every X minutes. Hourly: Run sync tasks recurrently every X hours. Daily: Run sync tasks recurrently on a certain time daily. Weekly: Run sync tasks recurrently on a certain time and in specific months every X weeks. Monthly: Run sync tasks recurrently every month on day number X, on a certain time and in specific months. Filters DirSync Pro has comprehensive filters to include or exclude files and directories. The user can set up a combination of unlimited number of filters of the following types: Filter based on string patterns in file/directory names. Filter based on file sizes. (smaller than, equal, larger than). Filter based on modification dates (earlier than, on a date, later than). Filter based on an absoulte path. Filter based on DOS attibutes (DOS/MS Windows only). Filter based on file ownerships (user and group, POSIX only). Filter based on file permissions (POSIX systems only). General Easy, clear and user-friendly graphical user interface, no unnecessary gadget you never use. Runs on every modern operating system including Windows™, Linux™ and Macintosh™ It is Portable! It does not need any installation. Just run the application! Open source, it is 100% free of charge, 100% free of commercial text, 100% free of advertisements and 100% free of spyware. No time/function limitations Uses no local database, so no overhead Does not need any installation. Just download and run it. You can put it on you USB-stick en you can run it on any computer/any platform. Does not copy your files to a server on internet to synchronize your data. In this way you are totally in charge of your data. Lets your create a command line and save it to a batch file to run a synchronization with one mouse click or in a batch. Logging Advanced logging/reporting facilities. Just select a log level and define where to write the log. Option to log on application level (default log) Option to log on each directory level (dir log) Option to define the log leven (how much to log)