samer@4: function y=quant(q,x) samer@4: % quant - Quantize values samer@4: % samer@4: % quant :: real ~'quantum', real~'values to quantize' -> real. samer@4: % samer@4: % Note: this function uses ceil, not floor or round to quantize. samer@4: samer@4: y=q.*ceil(x./q);