[fortran90] cartesian to polar coordinate

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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
7K