std function won't execute

5 visualizaciones (últimos 30 días)
Priyansh Arya
Priyansh Arya el 12 de Nov. de 2020
Comentada: Priyansh Arya el 12 de Nov. de 2020
Whenever I'm using std function to calculate the standatd deviation, it is showing "Attempt to execute SCRIPT std as a function:". The error is only being displayed while using std function, and not with other functions.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 12 de Nov. de 2020
This means that you have created a file named 'std.m' in MATLAB path, which is shadowing MATLAB's builtin std() function. You can run the following line
which std
It will show you the path to file that is shadowing std(). Rename the file to something else.
  1 comentario
Priyansh Arya
Priyansh Arya el 12 de Nov. de 2020
Thank you so much. I was stuck due to this problem from more than a week. This helped!

Iniciar sesión para comentar.

Más respuestas (1)

madhan ravi
madhan ravi el 12 de Nov. de 2020
You have a file named std.m , rename it or remove it from the path.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by