フィルターのクリア

How to shift the origin or how to make median of the data to be origin or zero?

2 ビュー (過去 30 日間)
Micky
Micky 2013 年 5 月 9 日
I have an array with some Floating point data in it. I basically want that mean or median of the data should be origin or zero. How could one make changes to solve this issue.
For example : aa = [ 126.2694 126.5572 126.7761 126.9034 126.5753 126.8071 128.5295 127.3070 126.3656 127.1065 126.2752]
I know there is a function to calculate the median of this data which is bb = median(aa); and that gives: bb = 126.7761
Now, I want median to be the origin of the aa array. How should I proceed?

回答 (1 件)

John Doe
John Doe 2013 年 5 月 9 日
編集済み: John Doe 2013 年 5 月 9 日
Do you just want to substract the median value? In that case:
cc = aa-median(aa);
Now the median of cc = 0.
Hope it helps =)
- Rob

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by