How can I convert power operator of Matlab (^) to (**) to be used in Fortran?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2015-5-13
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fortran with MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!