How do I call a MATLAB Script using javascript?

2 visualizaciones (últimos 30 días)
Austin Tang
Austin Tang el 21 de Jul. de 2015
Comentada: Austin Tang el 3 de Ag. de 2015
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 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

Respuestas (1)

Dasharath Gulvady
Dasharath Gulvady el 23 de Jul. de 2015
Editada: Dasharath Gulvady el 23 de Jul. de 2015
  • 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 comentario
Austin Tang
Austin Tang el 3 de Ag. de 2015
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!

Iniciar sesión para comentar.


Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.


Community Treasure Hunt

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

Start Hunting!

Translated by