Write a unit test for a couple of MATLAB® figure axes properties using fresh fixtures and file fixtures.
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 function COLORNAMES matches the input RGB values or color name strings to the closest colors from the selected palette. COLORNAMES returns the same outputs whether matching names or
We will now look at defining methods in the class definition file which are the operations that we can carry out with the class.
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
The function NATSORTFILES sorts a cell array of filenames or filepaths (1xN char), taking into account any number values within the strings. This is known as a natural order sort or an
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
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
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
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.
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
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?
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
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
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.
This script uses the class definition TestClass to create instances of TestClass and to clone its instances.
Pack and unpack data using the provided packData and unpackData functions
This example was authored by the MathWorks community.
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
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
Library of transforms (moment generating functions) of commonly ecountered jump distributions in finance. Part of the CFH Toolbox.
Compute normalized probability density function from characteristic function. Part of the CFH Toolbox.
You can create a customized class by specifying that your class inherits from another class.
Compute spread option prices on the difference between to assets' price levels. Part of the CFH Toolbox.
Returns the no arbitrage drift coefficients of an AJD process. Part of the CFH Toolbox.
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.
Returns the characteristic function evaluation of commonly encountered models in finance. Part of the CFH Toolbox.
Test sads class using separate methods (see +valueSeparateMethods folder)
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
Use Python® language functions and modules within MATLAB®. The example calls a text-formatting module from the Python standard library.
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.
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
Pass enumeration values to the readEnum function in the shrlibsample library. Load the library.
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.
Use the whiteboard System object. Each time you run the object, it draws a line on a whiteboard.
Analyze the information returned by a test runner created from the SolverTest test case.
Evaluate the expression x+y in Python®. To evaluate an expression, pass a Python dict value for the globals namespace parameter.
Access an element of a Python® list variable containing list elements.
In this example, the CellModifyVisitor class implements the operations to modify the contents of cell arrays of types bool , double , and char , and contained cell arrays. You can add new
Create a Python® tuple variable with a single element. A tuple with one element has a trailing comma.
Change the height of a row, defined by a Range object, in a spreadsheet.
Pass the backslash control character (\) as a Python® str type.
Display the last element in a Python® list variable. The example compares indexing into a MATLAB® cell array with indexing into a Python list.
Call the Python math.fsum function, which sums the floating-point values in an interable input argument.
Use the Python® path separator character (;). In MATLAB®, a Python character is a py.str variable.
Convert a Python® list of numeric values into a MATLAB® array of double.
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.
Use Python® numbers in MATLAB®. The trigonometry functions in the math module return Python float types.
Use a visitor class to define operations to perform on specific types of matlab::data::Array .
Display the first character of a Python® str variable. The example compares indexing into a MATLAB® character vector with indexing into the Python variable.
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
Display HTML text from the first paragraph on the www.mathworks.com website.