Divide an Array into a Scalar in FORTRAN: Get Help Here!

  • Context: Fortran 
  • Thread starter Thread starter Davoodk
  • Start date Start date
  • Tags Tags
    Array Fortran Scalar
Click For Summary
SUMMARY

The discussion focuses on dividing elements of a 1x3414 matrix in FORTRAN by a scalar value of 48960 (which is 24480 multiplied by 2). Users seek guidance on the appropriate FORTRAN functions to achieve this operation. The conversation highlights the need for clarity in the user's request and emphasizes the importance of demonstrating prior attempts to solve the problem. Key functions and array manipulation techniques in FORTRAN are implied as necessary for successful execution.

PREREQUISITES
  • Understanding of FORTRAN array syntax and operations
  • Familiarity with matrix dimensions and manipulation
  • Knowledge of scalar division in programming
  • Basic troubleshooting and debugging skills in FORTRAN
NEXT STEPS
  • Research FORTRAN array operations and syntax
  • Learn about scalar division in FORTRAN
  • Explore FORTRAN matrix manipulation techniques
  • Investigate common debugging practices for FORTRAN code
USEFUL FOR

This discussion is beneficial for FORTRAN programmers, particularly those working with array manipulations and matrix operations, as well as students learning numerical methods in scientific computing.

Davoodk
Messages
11
Reaction score
0
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
 
Technology news on Phys.org
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.
 
Davoodk said:
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 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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K