Why does running a script cause a memory error, while running the same script as a function does not?

I have found that running a script as a script by simply calling it from the command line causes a memory error, yet, running the same script as a function does not. Does anyone know why this is the case?

댓글 수: 5

We can't know why immediately. You haven't shown us the script/function that proves that it is true.
That would be handy, but the script that generates the error is quite long (~1000 lines), I'll try to find a simpler approach that replicates the issue.
You can attach the file here as a comment
Also can you post the exact error message.
How do you run a script as a function? Did you edit the m-file?

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

질문:

2016년 2월 2일

댓글:

2016년 2월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by