How do I call a MATLAB Script using javascript?

Hi there,
So I'm trying to set up a webpage to run a MATLAB Script. I have been trying to follow the steps from http://blogs.mathworks.com/community/2009/06/22/interactive-web-pages-in-matlab-part-4/ using matlab:COMMAND and I created a script in MATLAB named mainGUI and I called it using matlab:mainGUI.
When I try to run the script, I get the error:
Uncaught ReferenceError: mainGUI is not defined
at <anonymous>:2:8
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
Am I using the matlab:COMMAND wrongly?
Thanks, Austin

답변 (1개)

Dasharath Gulvady
Dasharath Gulvady 2015년 7월 23일
편집: Dasharath Gulvady 2015년 7월 23일

0 개 추천

  • Make sure mainGUI is a MATLAB function and not just a script
  • Make sure mainGUI is in the current folder or MATLAB's search path

댓글 수: 1

Hi Dasharath Gulvady,
Thank you for answering my question.
My mainGUI is a function and it is in the current folder.
Is it possible to link me a guide of sorts?
Thank you!

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

카테고리

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

태그

질문:

2015년 7월 21일

댓글:

2015년 8월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by