- Normalize single column:
How to normalize a single row wise in MACONT, or multiply equation to single column only
조회 수: 1 (최근 30일)
이전 댓글 표시
I am making a code for MACONT and using 3 normalization technique, I am unable to normalization single column with their respective value (0-1) eventually ended up normalizing the the whole data from 0-1
Or is this possible to mulitpy a certain equation to one coloumn only without extracting it
댓글 수: 0
답변 (1개)
Arun
2024년 6월 21일
Hi Mrityanjay Kumar,
I understand that you want to normalize a single column or mulitply a certain equation to one coloumn only without extracting it.
Below are sample scripts to perform required opereations:
% Specify the column to normalize
colIndex = 2;
% Extract the column
col = data(:, colIndex);
% Normalize the column to the range [0, 1]
normalized_col = (col - min(col)) / (max(col) - min(col));
% Replace the original column with the normalized column
data(:, colIndex) = normalized_col;
2. Mulitply a certain equation to one coloumn only without extracting it:
% Specify the column to modify
colIndex = 2;
% Apply the equation directly to the column
data(:, colIndex) = data(:, colIndex) * 2;
This examples should give an idea of how to proceed and achieve the required task.
For more information related to multi-dimensional array, please refer the following documentation link: https://www.mathworks.com/help/matlab/math/multidimensional-arrays.html
Hope this helps!
Regards
Arun
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!