# Manipulating lists with constant values [duplicate]

let us assume we have some data in the following form.

Table[data[[1,i,{1,2}]],{i,1,Length[data[[1]]]}]


This would give all $x-y$ pairs of the first file. What I want to do now is to multipliy this table with constant factors but different factors for $x$ and $y$. I found a solution for this with

MapThread[ Composition[Flatten, List], {xlist, #}] & /@ ylist


where xlist is

 Table[data[[1,i,1]],{i,1,Length[data[[1]]]}]*c1


and ylist is

 {Flatten[Table[data[[1,i,2]],{i,1,Length[data[[1]]]}]]}*c2


Is there a more comfortable way to do this?

Sincerely

EDIT:

 test= {{0.0015856, -1486.76}, {0.00157776, -1483.45}}


I need :

 test2= {{1.5856, -148.676}, {1.57776, -148.345}}


So the $x$ values should be multiplied with $1000$ and the $y$ values multiplied with $0.1$

EDIT2:

Transpose is exactly what I need, thank you very much

## marked as duplicate by Kuba♦, ciao, m_goldberg, bobthechemist, JensMay 22 '14 at 17:22

• Please state clearly what is the structure of the list you want to multiply by those constants- Is it {{x1,y1},{x2,y2}..}? – Dr. belisarius May 22 '14 at 2:27
• Your question is quite opaque. Is something like this what you mean? pairs = {{1, 2}, {3, 4}, {5, 6}}; Transpose[{10, 100}*Transpose[pairs]] – ciao May 22 '14 at 2:35
• Closely related topics: flexible threading and elegant operations on columns. Moreover: test[[ ;; , 1]] *= 1000; test[[ ;; , 2]] *= .1; – Kuba May 22 '14 at 8:37

    test = {{0.0015856, -1486.76}, {0.00157776, -1483.45}};
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.20899754762649536, "perplexity": 4404.073102961786}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195525136.58/warc/CC-MAIN-20190717101524-20190717123524-00472.warc.gz"}