Question: 2) In the C Shell one can not do floating point operations. That is, you can not do math with real numbers. However, it is

 2) In the C Shell one can not do floating point

2) In the C Shell one can not do floating point operations. That is, you can not do math with real numbers. However, it is sometimes necessary to do so. A quick work around is to do the math inside a program like the basic calculater (e.g., use: be -l). This is by no means an elegant solution, typically if we want to do math we use another programming language, but occasionally we just need to do some basic calculations inside a shell script. Later, when we learn GMT, you might instead choose to use gmtmath. But for now, write a shell script that will allow you to do a simple calculation on floating point numbers. Take as input a coordinate position in polar coordinates (Radius, and angle theta in degrees) and output the equivalent Cartesian coordinate position. Hint, do something like the example shown earlier in this lecture. E.g, something like: be-1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!