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,
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
Determine Minimum and Maximum Points and Add Text
Determine the minimum and maximum data points on a graph and add text descriptions next to these values.
Feature Based Panoramic Image Stitching
Automatically create a panorama using feature based image registration techniques.
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.
Plot Only Data Points
Plot only the data points by omitting the line style option from the line specification.
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
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
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
To create two-dimensional line plots, use the plot function. For example, plot the value of the sine function from 0 to :
Manipulating Multidimensional Arrays
Work with arrays having more than two dimensions. Multidimensional arrays can be numeric, character, cell, or structure arrays.
Single Hydraulic Cylinder Simulation
Use Simulink® to model a hydraulic cylinder. You can apply these concepts to applications where you need to model hydraulic behavior. See two related examples that use the same basic
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