about LUdecomposition of a sparse array

hi,
i wan’t to use LUdecomposition for a matrix a but don 't give me the good result
h = {{2, 4, -2}, {4, 9, -3}, {-2, -3, 7}}

{lu, p, c} = LUDecomposition[h]

i want to take upper element and lower element ,for that i use

lu SparseArray[{i_, j_} /; j >= i → 1, {2, 2}];

but no response,
please give me the good solution

thank you

You want

SparseArray[{i_, j_} /; j >= i -> 1, {3, 3}]

Note that there is the {i_,j_} pattern as well as the {3,3}

This then gives you, with

sa = SparseArray[{i_, j_} /; j >= i -> 1, {3, 3}];

then

lu sa

is

{{2, 4, -2}, {0, 1, 1}, {0, 0, 4}}