that compares the exponential function to an approximation of that function using the Taylor series. I want to plot the error found between the two functions for an increasing number of terms in the Taylor expansion. I thought this could be done using the code above but there is a problem with how the second loop works. I think the problem is that the full iteration of the second loop is being done within the first loop but changing the order of the loops gives another wrong answer. How can I get the value of error for each value of I to be outputted into some array that I have called expapproxarray that can then be plotted as a function of i?
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.