ch22


Release 10 (MATLAB 5.2) Enhancements (Release 11 New Features)  Release 11 New Features if ((parent.frames.lengthSupport for try/catch MATLAB 5.2 added functions to support try/catch error handling. Function Description catch Begin catch block. try Begin try block. Warning Messages The new lastwarn function, depending how it is called, returns either a string containing the last warning message issued by MATLAB or an empty string matrix until the next warning is encountered, or sets the last warning message to a specified string. Setting the Recursion Limit You can now set the limit for recursion so that you will receive an error instead of being forced out of MATLAB when the recursion limit is reached. The default recursion limit is 500. To change the recursion limit, change the following line set(0, 'recursionlimit', limitnumber) in your matlabrc.m file in the toolbox/local directory. New Mathematical Functions MATLAB 5.2 provided these new mathematical functions. Function Description cholinc Sparse Incomplete Cholesky and Cholesky-Infinity factorizations. cholupdate Rank 1 update to Cholesky factorization. ifftshift Inverse fast Fourier transform shift. ode23t Solve moderately stiff problems for a solution without numerical damping. ode23tb Solve stiff systems using crude error tolerances. May also be used if there is a mass matrix. qrupdate Rank 1 update to QR factorization. New String Comparison Functions Function Description strcmpi Compare strings ignoring case. strncmpi Compare first n characters of strings ignoring case. MATLAB 5.2 provided two additional string comparison functions. M-File Locking You can now lock (and unlock) an M-file so that clear does not clear that M-file from memory. Function Description mislocked True if M-file cannot be cleared. mlock Prevent M-file clearing. munlock Allow M-file clearing. Persistent Variables A variable may be defined as persistent (with the keyword persistent) so that it does not change value from one call to another. Persistent variables may be used within a function only. Persistent variables remain in memory until the M-file is cleared or changed. persistent is exactly like global, except that the variable name is not in the global workspace, and the value is reset if the M-file is changed or cleared. Three MATLAB functions support the use of persistent variables (see "M-File Locking" above): mislocked mlock munlock File and Directory Handling You can copy a file and make a directory from within MATLAB. Function Description copyfile Copy file. mkdir Make directory. Enhancement to load MATLAB 5.2 added a new option to the load function. S = load(...) returns the contents of a MAT-file as a structure instead of directly loading the file into the workspace. The field names in S match the names of the variables that were retrieved. When the file is ASCII, S will be a double precision array. Cell Array of Strings You can now use a cell array of strings with the following functions: intersect ismember lower setdiff setxor sort union unique upper Enhancement to strjust The strjust function now does right, left, and center justification. Change in clc and home Behavior The clc and home commands now both clear the command window. After issuing either of these commands, it is no longer possible to scroll back to see previous contents of the command window. Additional Functions Changed in MATLAB 5.2 In addition to the above functions, the MATLAB 5.2 version of the following functions changed in minor ways, generally to reflect the addition of the new functions described above (e.g., clear does not clear if mlock is called first). clear end horzcat lasterr paren spline strcmp strncmp [ Previous | Next ]

Wyszukiwarka

Podobne podstrony:
CH22
ch22
ch22
ch22 (2)
ch22
ch22
ch22 (16)
ch22
ch22
ch22
ch22
ch22 (19)
ch22 (4)

więcej podobnych podstron