Function saying too many outputs

3 vues (au cours des 30 derniers jours)
Jordan Rosales
Jordan Rosales le 31 Jan 2021
Modifié(e) : Cris LaPierre le 31 Jan 2021
I am trying to create a function that takes the i, j, and k values of a vector and calculates the magnitude and unit vector. If I attempt to call the function from the command line, I either only end up with the magnitude, or I get an error. Any suggestions on how to make/change the function to return two outputs?

Réponses (1)

Cris LaPierre
Cris LaPierre le 31 Jan 2021
Modifié(e) : Cris LaPierre le 31 Jan 2021
Notice the orange highlight and red underline in your function? Hover over that to see what the error message is.
Try saving your function using the same name for the file as the function name. See more here.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by