Questions tagged [fortran]
Questions about interfacing Mathematica and Fortran. This also includes conversion of Fortran style numbers to Mathematica style.
53 questions
1 vote
1 answer
264 views
Exporting a table using Fortran format for numbers [duplicate]
I would like to export in txt or tsv format a table that contains both alphameric and numeric entries, but I would like the numeric entries to be exported in Fortran format. For example 1.234E-9. Is ...
6 votes
1 answer
271 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 ...
20 votes
1 answer
1k views
Is it possible to use the DGEEV and DSYEV LAPACK subroutines in Mathematica?
Here is my problem: I'm diagonalizing some matrices using Eigensystem[] to obtain eigenvalues and eigenvectors and I'm diagonalizing the same matrices using a ...
0 votes
1 answer
312 views
When I transform a long expression into fortranform, the output adds a minus sign at every row. How to fix it?
I try to transform the following expression into fortranform ...
1 vote
1 answer
283 views
Run a code in Fortran, C++, or Python in Wolfram Mathematica 12 on Mac OS [closed]
I would like to run an external code, written in Fortran, C++, or Python, within Wolfram Mathematica 12 on my MAC OS. I looked up on Internet and I tried to read the WSTP documentation on Wolfram ...
2 votes
3 answers
319 views
ListPlot3D from Data Fortran file
My .dat file (Fortran) consists of data (x y u) as three columns and I would like to plot the variable "u" against the variables "x" and "y&...
3 votes
2 answers
2k views
Passing vectors into a Fortran function and getting out a vector
I am writing a Fortran function that needs to receive two vectors of reals, and as an output, returns a vector. The function could be for example the sum of the two vectors: ...
0 votes
0 answers
181 views
Cannot open Utilities 'FilterOptions'
I'm trying to run a code like this in Mathematica: ...
2 votes
0 answers
179 views
Convert huge (10-100MB of plain text) Mathematica function for external use
I have a huge Mathematica function (plain text ranging 10-100MB) that I am trying to convert to Fortran for external use. I tried using FortranForm, which does most of the work, and cleaned the code ...
6 votes
3 answers
769 views
Convert Fortran-like number form to traditional number form
What is the most elegant way to convert arbitrary numbers written as (verbatim): 1.13903 e - 08 into traditional Mathematica number form without having to ...
1 vote
0 answers
269 views
How to integrate a function written in fortran that solves a set of nonlinear equations into mathematica?
I am trying to integrate the solver for the set of nonlinear equations link written in Fortran language into mathematica . To do so i developed a function called netlib based on the explanation given ...
2 votes
2 answers
279 views
Add a suffix to the end of every number in a string [duplicate]
I have some polynomial e.g. $2x^2 + 3x + 4$ In Mathematica I can define this, and convert it to a string simply enough ...
1 vote
0 answers
234 views
Can we link Mathematica and Fortran with WSTP? [closed]
How to link Mathematica and Fortran with WSTP?
2 votes
2 answers
560 views
Mathematica code in fortran [closed]
I have an integral in which the integrand is a combination of ratio of modified bessel function of second kind. I am able to find the solution of this integral with mathematica Nintegrate module with ...
1 vote
1 answer
431 views
Printing all elements of table in Fortran form
Let's say I have some Table object. The elements of this table are accessed as Table[[i,j,k]]. For each element in the array I ...