How can I convert power operator of Matlab (^) to (**) to be used in Fortran?
조회 수: 4 (최근 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!