Portfolio Optimization Examples
The following sequence of examples highlights features of the Portfolio object in the Financial Toolbox™. Specifically, the examples show how to set up mean-variance portfolio optimization problems that focus on the two-fund theorem, the impact of transaction costs and turnover constraints, how to obtain portfolios that maximize the Sharpe ratio,
Modeling the United States Economy
Economists and policymakers are concerned with understanding the dynamics of economies, especially during periods of significant macroeconomic shocks. Although numerous approaches are possible, we will develop a small macroeconomic model in the style of Smets and Wouters.
Perform classification using discriminant analysis, naive Bayes classifiers, and decision trees. Suppose you have a data set containing observations with measurements on different variables (called predictors) and their known class labels. If you obtain predictor values for new observations, could you determine to which classes those
Face Detection and Tracking Using the KLT Algorithm
Automatically detect and track a face using feature points. The approach in this example keeps track of the face even when the person tilts his or her head, or moves toward or away from the
Use Simulink® to model a toy quadcopter and its cameras to help estimate the snow levels on the MathWorks Apple Hill campus roof.
Removing High-Frequency Noise from an ECG Signal
This examples shows you how to filter an ECG signal that has high-freqquency noise, and remove the noise by low-pass filtering.
Change Grid Line Style
Change the grid line style using the GridLineStyle and MinorGridLineStyle axes properties. Line style options are a solid line, '-', a dotted line, ':', a dashed line, '--', and a
Codegen of Pack and Unpack Example
This example shows how to generate code from packData and unpackData
Pack and Unpack Data Example for MATLAB
Pack and unpack data using the provided packData and unpackData functions
Manipulating Multidimensional Arrays
Work with arrays having more than two dimensions. Multidimensional arrays can be numeric, character, cell, or structure arrays.
You can display multiple plots in different subregions of the same window using the subplot function.
To create two-dimensional line plots, use the plot function. For example, plot the value of the sine function from 0 to :
Modeling a Fault-Tolerant Fuel Control System
Combine Stateflow® with Simulink® to efficiently model hybrid systems. This type of modeling is particularly useful for systems that have numerous possible operational modes based on
Designing a Guidance System in MATLAB and Simulink
Use the model of the missile airframe presented in a number of published papers (References ,  and ) on the use of advanced control methods applied to missile autopilot design. The