The function NATSORTFILES sorts a cell array of filenames or filepaths, taking into account any number values within the strings. This is known as a "natural order sort" or an "alphanumeric
The following document was built from posts written for the blog "Loren on the Art of MATLAB". The ideas presented below in anonymous functions have been written as .m files so that they might
This example was authored by the MathWorks community.
QRcode_gen can generate QR-Codes based on the zxing libraries (http://github.com/zxing). For this purpose it will import all necessary jar files on the fly from a maven repository server
We will now look at defining methods in the class definition file which are the operations that we can carry out with the class.
Pack and unpack data using the provided packData and unpackData functions
This is the most useful diagram for visualizing the contest. It shows the dramatic improvements that occur over time. Each passing entry is a dot, with its submission time on the x-axis and
This example shows how to generate code from packData and unpackData
Compute normalized probability density function from characteristic function. Part of the CFH Toolbox.
This contribution presents a small tool to trace calls to methods and functions. There was no tracing tool for Matlab to find on the Internet and still isn't?
This script uses the class definition TestClass to create instances of TestClass and to clone its instances.
Returns the characteristic function evaluation of commonly encountered models in finance. Part of the CFH Toolbox.
Library of transforms (moment generating functions) of commonly ecountered jump distributions in finance. Part of the CFH Toolbox.
Let's say that the sensor array data set was very large, taking up several GB. Althought you may modfiy it and you would never need to make a copy of it. In this case a handle class implementation
To monitor an object you first need to add an event to the class definition of the object, such as in this example. (see ev.m). Here we add an event called SavedData to this class which denotes
Compute spread option prices on the difference between to assets' price levels. Part of the CFH Toolbox.
This presentation proceeds in stages, each version an extension of its predecessor (bootstrapping). The development stops well short of an industrial compiler but that is not because of
We are going to create a class to describe the sensor array data set. First we will look at specifying the properties. You define a class in MATLAB with a class definition file.
You can create a customized class by specifying that your class inherits from another class.
Returns the extended characteristic function evaluation of a parameterized Affine Jump-Diffusion (AJD) process. Part of the CFH Toolbox.
Returns the characteristic function evaluation of a parameterized Affine Jump-Diffusion (AJD) process. Part of the CFH Toolbox.
Test sads class using separate methods (see +valueSeparateMethods folder)
QRcode_gen can generate QR-Codes based on the zxing libraries ( http://github.com/zxing ). For this purpose it will import all necessary jar files on the fly from a maven repository server
The limitation of 52 phrase names and the ursurpation 1/2 of them for Kleene*, and 8 of them for built-in character classes, is the last of the tasks set in Chapter 1. It would be nice to play the
The Grammar Executing Machine principle has been demonstrated in Chapter 1. The version 0 driver gem0.m and MEX files iog0.c and iog0.h provide no-frills code that runs on the edge of
All compilers have to connect to the underlying hardware. That in turn requires knowing where the bits need to go. It isn't always fun, but that is what compiler writers do.
Up until now the emphasis has been on choosing new capabilities expressed first as bootstraps, then building the capabilities into GEM itself. The final built-in capability of GEM added
Returns the no arbitrage drift coefficients of an AJD process. Part of the CFH Toolbox.
If hot=true, the database structure is modified as needed. e.g, when you get a table with d.table('tablex'), tablex is automatically created. Similarly, when you insert entries into
This is the first entry in the Data Visualization contest. It contains the data set contest_data
Write a unit test for a couple of MATLAB® figure axes properties using fresh fixtures and file fixtures.
These examples show how to use Python® language functions and modules within MATLAB®. The first example calls a text-formatting module from the Python standard library. The second example
When unit testing, you are often interested in testing a portion of a complete system, isolated from the components it depends on. To test a portion of the system, we can substitute mock
Set a static property using the NET.setStaticProperty function.
Convert a Python® list of numeric values into a MATLAB® array of double.
Create a Python® tuple variable with a single element. A tuple with one element has a trailing comma.
Access an element of a Python® list variable containing list elements.
Call the Python math.fsum function, which sums the floating-point values in an interable input argument.
Display HTML text from the first paragraph on the www.mathworks.com website.
Use the Python® path separator character (;). In MATLAB®, a Python character is a py.str variable.
Display the last element in a Python® list variable. The example compares indexing into a MATLAB® cell array with indexing into a Python list.
Pass the backslash control character (\) as a Python® str type.
Display the first character of a Python® str variable. The example compares indexing into a MATLAB® character vector with indexing into the Python variable.
Change a value in a dict variable using the Python® update method.
Create a .NET jagged array of System.Double using the NET.createArray function.
Change the height of a row, defined by a Range object, in a spreadsheet.
Evaluate the expression x+y in Python®. To evaluate an expression, pass a Python dict value for the globals namespace parameter.
Use Python® numbers in MATLAB®. The trigonometry functions in the math module return Python float types.
Analyze the information returned by a test runner created from the SolverTest test case.
Create a pointer to a subset of a MATLAB vector X . The new pointer is valid only as long as the original pointer exists.
Pass a MATLAB character array str to a C function, stringToUpper .
Pass data stored columnwise in a MATLAB array to a C function that assumes a row-by-column format.
How a C function changes the dimensions of a MATLAB array, and how to restore its shape.
Pass a MATLAB structure to a C library function, addStructByRef . When you pass the structure, MATLAB automatically converts the field types, but MATLAB also makes a copy of the fields.
Create a MATLAB® cell array of character vectors, mlStringArray , from the output of the getListOfStrings function.
How calling the addStructByRef function with a pointer modifies the fields in the input argument.
Use pointer arithmetic to access elements of a structure. The example creates a MATLAB structure, based on the c_struct definition in the shrlibsample.h header file.
Add a plugin to the test runner. The matlab.unittest.plugins.TestRunProgressPlugin displays progress messages about a test case. This plugin is part of the matlab.unittest package.
Preconvert structure sm to c_struct before calling addStructFields . If you repeatedly pass sm to functions, preconverting eliminates the processing time required by MATLAB to