All Questions
Tagged with fortran formatting
10 questions
6
votes
1
answer
215
views
Python compatible fortran form for complex numbers
I am trying to use the Mathematica output of a complicated expression as input for python. As suggested in this answer, the FortranForm of an expression already ...
0
votes
2
answers
144
views
Replacing all integers in a string
Let's say I have some expression like,
expr = 1*a + 2*b +3*c + 4*d
I want to write this to a string that I can then use in some other Fortran script. I want all ...
2
votes
0
answers
348
views
Fortranform output in double precision
I want to take the output in fortran form but written in double precision notation.
For example,
exp=1 + 8*as^2*Log[2*x]
which gives
...
0
votes
1
answer
168
views
how to include conditional statements in FortranForm?
how to to include following formula in the FortranForm in a correct format?
...
2
votes
2
answers
206
views
Problem with Dot and FortranForm
I am trying to convert some set of equations to a form that will be easy for Python to evaluate numerically, hence I am using Mathematica's FortranForm
My problem ...
5
votes
1
answer
166
views
Customized FortranForm output
Let's take the following example
V = (-G*Mn)/Sqrt[x^2 + y^2 + z^2 + cn^2];
Vx = D[V, x];
FortranForm[Vx]
The result is ...
1
vote
1
answer
489
views
How to get output in a specified format
In Fortran, we can easily get the stardard and easy output format. Now, we only focus on the Integer output. See here
How to realize this kind of output as formatted text file using Mathematica ? (...
4
votes
2
answers
414
views
How to show Output of matrix in FortranForm with "&" character?
I have a matrix. and i have shown the output of matrix one by one element in FortranForm.
the problem is i want to put "&" continuation charater in output because when i am copying the data into ...
9
votes
3
answers
3k
views
How to change an expression to Fortran90 form?
I have a large expression produced by Mathematica. To use this expression in my Fortran program I need to change it to a Fortran90 form. I am not satisfied with the ...
19
votes
6
answers
15k
views
How to export data files using specific number format
Very often, I have to export data files from Mathematica. These output files contain several columns and hundreds of lines with data. For the sake of the question let's create a sample list:
...