I am really frustrated in trying to find the answer to this question. I have written a function that creates an upper and lower limit using the same inputs. When I call the function I want it to display both the upper and lower limit. In all the searching I've done nobody answers this clearly enough. I need to see it done with MY function so that I can understand what all these explanations are trying to say.
function [Eupper Elower]=HS(Vr,Gm,Gr,Em,Er,vm,vr);
When I call on the function I want to see it give me a result [Eupper, Elower]. Please do it to my code instead of trying to explain it, I am very frustrated trying to understand the explanations on here.
That is how I was calling for it, so in the explanations they must have meant during the actual use of the function you need to assign it to a variable?
"Is it because when I called for the function I did not assign the results?"
"...in the explanations they must have meant during the actual use of the function you need to assign it to a variable?"
Yes, that is correct. If you do not assign any output arguments then the first one is assigned to the defaultans, and any remaining output arguments are ignored. If you want to do any work with the output arguments (e.g. display them, or do calculations on them) then you need to call the function and explicitly define all of the output arguments that you need.
Note that how to call functions with multiple output arguments is explained in the introductory tutorials, which are highly recommended for all beginners (and you could have saved yourself some frustration):
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.