# depgendb

General declining-balance depreciation schedule

## Syntax

``Depreciation = depgendb(Cost,Salvage,Life,Factor)``

## Description

example

````Depreciation = depgendb(Cost,Salvage,Life,Factor)` computes the declining-balance depreciation for each period.```

## Examples

collapse all

A car is purchased for \$10,000 and is to be depreciated over five years. The estimated salvage value is \$1000. Using the double-declining-balance method, the function calculates the depreciation for each year and returns the remaining depreciable value at the end of the life of the car.

Define the depreciation.

```Life = 5; Salvage = 0; Cost = 10000; Factor=2;```

Use `depgendb` to calculate the depreciation.

`Depreciation = depgendb(10000, 1000, 5, 2)`
```Depreciation = 1×5 103 × 4.0000 2.4000 1.4400 0.8640 0.2960 ```

The large value returned at the final year is the sum of the depreciation over the life time and is equal to the difference between the `Cost` and `Salvage`. The value of the asset in the final year is computed as (`Cost` - `Salvage`) = `Sum_Depreciation_Upto_Final_Year`.

## Input Arguments

collapse all

initial value of the asset, specified as a scalar numeric.

Data Types: `double`

Salvage value of the asset, specified as a scalar numeric.

Data Types: `double`

Number of periods over which the asset is depreciated, specified as a scalar numeric.

Data Types: `double`

Depreciation factor, specified as a scalar numeric. When `Factor` = `2`, then the double-declining-balance method is used.

Data Types: `double`

## Output Arguments

collapse all

Depreciation, returned as the declining-balance depreciation for each period.

## Version History

Introduced before R2006a