Run function with multiple arguments in terminal

Hi,
I install Matlab2017a mac version and several function are written and corresponding protected files are generated.
I want to call the function in terminal and find out a way with command line "matlab -r 'function args'"
but error in "-bash: matlab: command not found"
What should I do? Thank you

댓글 수: 2

KSSV
KSSV 2017년 6월 25일
What function you checked ?
Self-defined function.

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

답변 (1개)

Jan
Jan 2017년 6월 25일
편집: Jan 2017년 6월 25일

0 개 추천

Is the installation folder of Matlab in your PATH? If not:
/Applications/MyMATLAB/MATLAB_R2015a.app/bin/matlab -r "yourFunction(Args)"
See these links, which can be found by asking Google (implicite hint):

댓글 수: 1

If you are running from a shell script without a display, you might want to use
alias matlab='/Applications/MATLAB_R2017a.app/bin/matlab -nojvm -nodesktop'
in your ~/.bash_profile

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

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

태그

질문:

2017년 6월 25일

댓글:

2017년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by