Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[Fortran] help

  1. Oct 21, 2012 #1
    How can i divide elements of an array into a scalar. I mean, i have read my data file into a matrix in FORTRAN which this matrix is 1*3414. Then, I want that each elements of this matrix is divided to (24480*2).

    I will be so grateful if you guide me the appropriate function.

    Thanks a lot
  2. jcsd
  3. Oct 21, 2012 #2
    Have you read anything about Fortran?
    about arrays in Fortran?
    As far as your division goes:
    What have you tried?
    Did it work?
    Why not?
    What did you expect the result to be?

    Show something effort, trials and errors, first, please.
  4. Oct 21, 2012 #3


    Staff: Mentor

    I have no idea what you are asking. In particular I don't understand "divide elements of an array into a scalar."

    My interpretation of what you said is that you have a matrix that is an array with 3414 elements. (A matrix with 1 row and 3414 columns.)

    Somehow you want to do something to this array to produce a matrix with 24480 rows and 2 columns.

    In addition to what gsal said, please clarify what you said above.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook