[fortran90] cartesian to polar coordinate

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 5K views
2000yak
Messages
1
Reaction score
0
Write a short FORTRAN90 subroutine to convert Cartesian coordinates (x, y, z) to spherical polar coordinates (r, q, f) using
• Write a FORTRAN90 program which uses this subroutine to convert the following (x, y, z) coordinates which are read from a text file and stored within a single vector (1D allocatable array) – (3.0, 4.5, -1.0) , (5.2, 2.6, 1.4) , (-1.0, -1.0, 0.0) , (0.0, 3.0, 3.0)
• Note that: – Both q and f should be output in degrees with 0 £ q £ 180º and 0 £ f < 360º – Both the program and the subroutine should be edited as separate files – The program should be able to convert any number of points and the results should be written to a text file.

this is the problem...
please... code this in fortran
 
Physics news on Phys.org
Yak, you have been tragically mis-informed. PF is not a job-shop code shack. You've got to do all your own coding.
 
Thread closed.

2000yak, read your private messages.