MATLAB Answers

How to normalize data?

3 ビュー (過去 30 日間)
SEVAL DONERTAS
SEVAL DONERTAS 2021 年 6 月 8 日
コメント済み: dpb 2021 年 6 月 8 日
Hi;
I have a txt file with two columns. I want to normalize the second y column to 1. How can I plot the normalized y axis vs. x axis?
I also upload the .txt file.
Could you please how can I write the Matlab code to plot a normalized graphic?
Thanks a lot..

回答 (2 件)

Christopher McCausland
Christopher McCausland 2021 年 6 月 8 日
Hi Seval,
Normalising data has several diffrent meanings statistically speaking. I am guessing given the mention of the Y column, you wish to scale your data between 0 and 1.
There are several diffrent methods to do this;
  1. Rescale
  2. Divide the entire column by the largest elemental value in the column provided this data is from 0-X.
Let me know if this is what you are looking for or a diffrent satisitcal meaning or normilisation.
Christopher

SEVAL DONERTAS
SEVAL DONERTAS 2021 年 6 月 8 日
Hi Christopher,
Actually; I have 5 different .txt file and I want to plot 5 different normalized graphic with these txt files. All of them have two columns (x and y). I want to normalize each y axis of five different txt files between 0 and 1.
I also add an example graphic that I want to obtain. Actually, I want to obtain a graphic trend as shown in this png file. Could you please help me about this issue?
I also add the txt files.
Best Regards,
  1 件のコメント
dpb
dpb 2021 年 6 月 8 日
https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html
Just give it a go; it's pretty simple and you'll be done while waiting for somebody else to do it for you....and have learned something alongst the way... :)

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by