how can i get function of sinh in taylor series
Ältere Kommentare anzeigen
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))
Antworten (1)
Thorsten
am 4 Dez. 2015
1 Stimme
The loop runs over k, but you use n in the formula.
Kategorien
Mehr zu Elementary Math finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!