Borrar filtros
Borrar filtros

How to normalize a single row wise in MACONT, or multiply equation to single column only

3 visualizaciones (últimos 30 días)
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

Respuestas (1)

Arun
Arun el 21 de Jun. de 2024
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:
  1. Normalize single column:
% 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

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by