フィルターのクリア

normalize a vector of points belonging to the interval [a,b]

1 回表示 (過去 30 日間)
thoraya
thoraya 2013 年 11 月 16 日
編集済み: Azzi Abdelmalek 2013 年 11 月 16 日
Hi, given an interval [a,b] where a and b can take either positive or negative value. how can i normalize a vector of points belonging to the interval [a,b]. Thanks

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 16 日
編集済み: Azzi Abdelmalek 2013 年 11 月 16 日
a=10;
b=20;
v=rand(1,10)*5+1
n_data = a+(b-a)*(v-min(v))/( max(v)-min(v))

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by