sym to fortran: matrix index
Mostrar comentarios más antiguos
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
Respuestas (0)
Categorías
Más información sobre Fortran with MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!