how can i get function of sinh in taylor series
Afficher commentaires plus anciens
clc;
clear;
close all;
n = input('Please give order number in the taylor series: ');
x = input('Please give a value for "x": ');
approxValue = 0;
% Initial value of approxValue.
for k = 0:n
approxValue = (approxValue + ((x.^((2*n)+1))/factorial((2*n)+1)));
% Gives the approx value of e^x as a taylor series
end
disp('approxValue =')
disp((approxValue))
disp('sinh(x)=')
disp(sinh(x))
Réponses (1)
Thorsten
le 4 Déc 2015
1 vote
The loop runs over k, but you use n in the formula.
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!