dataCol = {{A, 0.1, 0.3}, {B, 0.4, 0.6}, {C, 0.9, 0.9}};
Adding the Attribute HoldRest to your cutoffFuncCol:
ClearAll[cutoffFuncColB];
SetAttributes[cutoffFuncColB, HoldRest];
cutoffFuncColB[threshold_, inputlist_, col_] := (inputlist[[All, col]] =
inputlist[[All, col]] /. {x_ /; x > threshold -> x, x_ /; x < threshold -> 0}; inputlist);
dataColB = dataCol;
cutoffFuncColB[0.5, dataColB, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
Using Threshold instead of ReplaceAll:
ClearAll[cutoffFuncColC];
SetAttributes[cutoffFuncColC, HoldRest];
cutoffFuncColC[threshold_, inputlist_, col_] :=
(inputlist[[All, col]] = Threshold[inputlist[[All, col]], threshold]; inputlist);
dataColC = dataCol;
cutoffFuncColC[0.5, dataColC, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
Or
ClearAll[cutoffFuncColD];
cutoffFuncColD[threshold_, inputlist_, col_] :=
Module[{mm = inputlist}, mm[[All, col]] = Threshold[mm[[All, col]], threshold]; mm]
dataColD = dataCol;
cutoffFuncColD[0.5, dataColD, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
Using Chop:
ClearAll[cutoffFuncColE];
cutoffFuncColE[threshold_, inputlist_, col_] :=
Module[{tmp = inputlist}, tmp[[All, col]] = Chop[tmp[[All, col]], threshold]; tmp]
dataColE = dataCol;
cutoffFuncColE[0.5, dataColE, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
Using MapAt and UnitStep:
ClearAll[cutoffFuncColF];
cutoffFuncColF[threshold_, inputlist_, col_] :=
Module[{mm = inputlist}, mm = MapAt[# UnitStep[# - threshold] &, mm, {All, col}]; mm]
dataColF = dataCol;
cutoffFuncColE[0.5, dataColF, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
Using ReplacePart and Chop:
ClearAll[cutoffFuncColG];
cutoffFuncColG[threshold_, inputlist_, col_] :=
ReplacePart[inputlist, {i_, col} :> Chop[inputlist[[i, col]], threshold]]
dataColG = dataCol;
cutoffFuncColG[0.5, dataColG, 2]
(* {{A, 0, 0.3}, {B, 0, 0.6}, {C, 0.9, 0.9}} *)
{0 ,0 ,.9}because you only work withdataCol[[All, 2]]which is{.1, .4., .9}. – Öskå Oct 15 '14 at 15:49