How can I convert power operator of Matlab (^) to (**) to be used in Fortran?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
ND
el 13 de Mayo de 2015
Comentada: Star Strider
el 13 de Mayo de 2015
Please I am using Matlab to calculate a jacobian matrix then I need to transfer this matrix to fortran. the problem is Matlab uses the power operator as(^) while fortran uses (**). I try to convert this operator by using (strrep function) after calculating the jacobian matrix. However, Matlab gives me this error message. (convert to double from syms is not possible).
Please there is such a way to solve this problem?
Best regards & many thanks
0 comentarios
Respuesta aceptada
Star Strider
el 13 de Mayo de 2015
Don’t do it yourself! If you want to convert a symbolic expression to FORTRAN, use the fortran function. It will do the conversion for you.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Fortran with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!