| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
mprc = medprice(highp, lowp) mprc = medprice([highp lowp]) mprcts = medprice(tsobj) mprcts = medprice(tsobj, ParameterName, ParameterValue, ...)
highp | High price (vector) |
lowp | Low price (vector) |
tsobj | Financial time series object |
ParameterName | Valid parameter names are:
|
ParameterValue | Parameter values are the strings that represent the valid parameter names. |
mprc = medprice(highp, lowp) calculates the median prices mprc from the high (highp) and low (lowp) prices. The median price is the average of the high and low price for each period.
mprc = medprice([highp lowp]) accepts a two-column matrix as the input rather than two individual vectors. The columns of the matrix represent the high and low prices, in that order.
mprcts = medprice(tsobj) calculates the median prices of a financial time series object tsobj. The object must minimally contain the series High and Low. The median price is the average of the high and low price each period. mprcts is a financial time series object with the same dates as tsobj and the data series MedPrice.
mprcts = medprice(tsobj, ParameterName, ParameterValue, ...) accepts parameter name/parameter value pairs as input. These pairs specify the name(s) for the required data series if it is different from the expected default name(s). Parameter values are the strings that represent the valid parameter names.
Compute the median price for Disney stock and plot the results:
load disney.mat
dis_MedPrice = medprice(dis)
plot(dis_MedPrice)
title('Median Price for Disney')

Achelis, Steven B., Technical Analysis from A to Z, Second printing, McGraw-Hill, 1995, pp. 177 -178.
![]() | mean | merge | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |