Ask Your Question

Hirshy's profile - activity

2024-01-25 14:33:56 +0200 received badge  Famous Question (source)
2024-01-25 14:33:56 +0200 received badge  Notable Question (source)
2020-07-03 17:20:04 +0200 received badge  Popular Question (source)
2017-12-04 09:34:33 +0200 commented answer Read from csv-file, write results in new columns in the same csv-file

Thank you very much, I will look into that!

2017-11-30 19:20:09 +0200 received badge  Student (source)
2017-11-30 17:56:51 +0200 asked a question Read from csv-file, write results in new columns in the same csv-file

Hi,

I am currently trying to achieve the following:

given a csv-file e.g. like

x,y,sinx,siny
30,45,,
60,90,,

Values for x and y are given in degree. What I want to do: take the data from the csv-file, calculate sin(x) and sin(y) for the values given in each row and then print the result in the corresponding cell. If possible, do not round the result, so the output should look something like this:

x,y,sinx,siny
30,45,1/2,sqrt(2)/2
60,90,sqrt(3)/2,1

Taking this one step further, if possible the output should be printed in complete LaTeX-code because the date from the csv-file will be used in a LaTeX-document, so the best possible result would be:

x,y,sinx,siny
30,45,\frac{1}{2},\frac{\sqrt{2}}{2}
60,90,\frac{\sqrt{3}}{2},1

I do know about sageTex which is able to do this, but for other reasons I can't use sageTex for my problem.

I am completely new to sage, so I don't know if there is a standard procedure for this or if it is possible at all. Any input is appreciated!