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.
Counterparty Credit Risk and CVA
Compute the unilateral credit value (valuation) adjustment (CVA) for a bank holding a portfolio of vanilla interest rate swaps with several counterparties. CVA is the expected loss on an over-the-counter contract or portfolio of contracts due to counterparty default. The CVA for a particular counterparty is defined as the sum over all points in time of…
Lagrange Interpolation Polynomial
If you have a set of N points on a cartesian plane, there will always exist an N-1th order polynomial of the form y = a_0 + a_1.x + a_2.x^2 + ... a_n-1.x^(n-1) which passes through all the points. Lagrange came up with a neat approach to finding this polynomial, which is to construct a set of `basis' polynomials which are zero at all the specified points except for one, then scale and add them to match all the control points. LAGRANGEPOLY returns this polynomi
This product allows users to interactively design a tabular expression. The resusulting function can be saved as a Simulink block or to a Matlab m-file. Tabular Expressions can be proved to be disjoint and complete using the PVS theorem prover. This allows users to ensure that the table they are designing has covered all possible inputs and is deterministic.
Demo file for batchpleas.m
batchpleas is a wrapper for lsqnonlin, allowing it to solve many small problems (all with the same parameterization) in one batched, partitioned nonlinear least squares estimation. This takes advantage of economies of scale, so as to gain a higher throughput overall. The gain can be dramatic.
Computational cost for Cramer's rule
There are plenty of direct and iterative methods to solve a linear algebraic system of equations. Using Cramer's rule, one can easily obtain the solution for small systems by hand. However, with the growth of the unknowns, the method becomes computationally very expensive. Moreover, calculating a determinant by its definition may result in overflow or underflow if someone wanted to apply it on a computer. That is why Cramer's algorithm is not applied in computations.
Modeling an Automatic Transmission Controller
This example shows how to model an automotive drivetrain with Simulink®. Stateflow® enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful environment for the modeling and simulation of dynamic systems and processes. In many systems, though, supervisory functions like changing modes or invoking new gain schedules must respond to events that may occur and conditions that develop over time. As a result, the environment requires a language capable of
Designing a High Angle of Attack Pitch Mode Control
This example shows how to use the Control System Toolbox™ and Simulink® Control Design™ to interact with Simulink to design a digital pitch control for the aircraft. In this example, we will design the controller to permit the aircraft to operate at a high angle of attack with minimal pilot workload.
Simulating Automatic Climate Control Systems
This example shows how to simulate the working of an automatic climate control system in a car using Simulink® and Stateflow®. You can enter a temperature value you would like the air in the car to reach by double clicking the User Setpoint in Celsius Block and entering the temperature value. You can also set the External Temperature in Celsius in a similar way. The numerical display on the right-hand side of the model shows the reading of a temperature sensor placed behind the driver's head. This is the te