Fortran How Can You Efficiently Store and Update Data in FORTRAN Arrays?

AI Thread Summary
The discussion centers on a user seeking assistance with storing and manipulating data in FORTRAN. The user intends to use two arrays, A and B, each with 900 elements, to initially store 30 X and Y values. After performing scientific calculations, the user wants to store an additional 30 modified values starting from the 31st element of each array. The user requests guidance on writing the algorithm in FORTRAN to achieve this data storage and printing. A response questions the necessity of having 900 elements if only 60 will be utilized, suggesting that searching online for FORTRAN array examples could provide helpful insights.
amitavorc2
Messages
1
Reaction score
0
Dear Sir,

I am using FORTRAN.
I have little experience and i am facing one problem.

I want to store data (i.e. X and Y values) in an array (A(900),B(900)) in such a way that at first I used only 30 elements of each array for storage 30 initial values of X and Y and then I have some scientific calculations to change the values of X and Y and then again want to store 30 modified values of X and Y in the same array from the 31th array element of both arrays. In this way I want to store my data and finally want to print these arrays.

Could you please help me out how I can write this algorithim I FORTRAN code…..

Please help me.

Please guide me

With best regards
 
Technology news on Phys.org
amitavorc2 said:
Dear Sir,

I am using FORTRAN.
I have little experience and i am facing one problem.

I want to store data (i.e. X and Y values) in an array (A(900),B(900)) in such a way that at first I used only 30 elements of each array for storage 30 initial values of X and Y and then I have some scientific calculations to change the values of X and Y and then again want to store 30 modified values of X and Y in the same array from the 31th array element of both arrays. In this way I want to store my data and finally want to print these arrays.

Could you please help me out how I can write this algorithim I FORTRAN code…..

Please help me.

Please guide me

With best regards
Why do you need arrays with 900 elements if you're planning to use only 60 of them? Also, a web search on "fortran array" should yield plenty of examples of how to use arrays.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top