MATLAB: How to normalize data set in MATLAB. If it is csv file .

csvdata setnormalize

I want to train my Extreme Learning Machine. but data set should be normalized between -1 to 1.My data set is csv file.i want to know how to normalize csv file.I read the question asked by others but it didn't work.please help.

Best Answer

  • You cannot normalize a file. You have to import the data at first, most likely by csvread or readtable. Then the normalization should be exactly as shown in many otehr threads:
    Data = rand(10, 20); % Test data, use your data instead
    minData = min(Data(:));
    maxData = max(Data(:));
    scaled = (Data - minData) / (maxData - minData); % Scaled to [0, 1]
    scaled = scaled * 2 - 1; % Scaled to [-1, 1]