sym to fortran: matrix index
Afficher commentaires plus anciens
Hello
'fortran' tranlates all number in sym expression to Fortran double precision number (e.g. 1.0D0) even for array index. I can not find a way to declare a matrix with symbolic dimensions in Matlab, so I declare them as functions. For example:
syms i integer
syms x(i)
fortran(x(i-1))
returns
ans =
' t0 = xx(ii-1.0D0)'
which is rather unconvenient. Is there any way to circumvent this problem?
Thank you.
Carlos SPAIN
Réponses (0)
Catégories
En savoir plus sur Fortran with MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!