How can I solve this error?

1 visualización (últimos 30 días)
Geraldine Rodríguez Coronado
Geraldine Rodríguez Coronado el 15 de Sept. de 2021
Comentada: Geraldine Rodríguez Coronado el 15 de Sept. de 2021
function[x,t,C] = GRxx_P8_E1(L,T,N,M,Dm,cond_inicial,cc_izda,cc_dcha)
Error: Function definition are not supported in this context. Functions can only be created as local or nested functions in code
files.

Respuesta aceptada

the cyclist
the cyclist el 15 de Sept. de 2021
Editada: the cyclist el 15 de Sept. de 2021
When defining a function using that syntax, it has to appear inside a file, for example a text file with the name GRxx_P8_E1.m
Then, you can call the function using the syntax
GRxx_P8_E1(L,T,N,M,Dm,cond_inicial,cc_izda,cc_dcha)
from the command line, or another file.
  1 comentario
Geraldine Rodríguez Coronado
Geraldine Rodríguez Coronado el 15 de Sept. de 2021
It still doesn't work :( but thank you so much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by