In[]:=
Remove["Global`*"]
data=Import["data.csv","CSV","HeaderLines"2];TableForm[{Transpose[data]},TableHeadings{None,{"x (cm)","δx(cm)"}}]
Out[]//TableForm=
x (cm) | δx(cm) | ||||||||||||
|
|
In[]:=
x=VectorAround[data[[All,1]],data[[All,2]]]
Out[]=
VectorAround[{49.9,60.2,70.1,79.8,90.,100.2},{0.1,0.1,0.1,0.1,0.2,0.2}]
I want to add units (cm) to the variable x. I want it to be
VectorAround[{49.9 cm, 60.2 cm, 70.1 cm, 79.8 cm , 90. cm, 100.2 cm }, {0.1 cm, 0.1 cm, 0.1 cm, 0.1 cm, 0.2 cm, 0.2 cm}] ?
For example, I can do this manually for two data points like this:
VectorAround[{49.9 cm, 60.2 cm, 70.1 cm, 79.8 cm , 90. cm, 100.2 cm }, {0.1 cm, 0.1 cm, 0.1 cm, 0.1 cm, 0.2 cm, 0.2 cm}] ?
For example, I can do this manually for two data points like this:
In[]:=
x=VectorAround[{Quantity[data[[All,1]][[1]],"Centimeters"],Quantity[data[[All,1]][[2]],"Centimeters"]},{Quantity[data[[All,2]][[1]],"Centimeters"],Quantity[data[[All,2]][[2]],"Centimeters"]}]
Out[]=
VectorAround,,,
Is there a better way to do this? This would be highly impractical to do manually with a large data set.