How can I solve this error?

조회 수: 1 (최근 30일)
Geraldine Rodríguez Coronado
Geraldine Rodríguez Coronado 2021년 9월 15일
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.

채택된 답변

the cyclist
the cyclist 2021년 9월 15일
편집: the cyclist 2021년 9월 15일
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
Geraldine Rodríguez Coronado
Geraldine Rodríguez Coronado 2021년 9월 15일
It still doesn't work :( but thank you so much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by