Help with plotting sin(X) for a taylor series
显示 更早的评论
回答(1 个)
KALYAN ACHARJYA
2019-2-3
编辑:KALYAN ACHARJYA
2019-2-3
Please check
for i = 0:9
sin_value = sin_value + (-1).^i * input_value^(2.*i+1)/factorial(2.*i+1);
end
end
Is it ok? or It may be
sin_value(i)=..
after iterations finish
plot(x_values, sin_value) %ensure both having same lengths
6 个评论
William Paik
2019-2-3
KALYAN ACHARJYA
2019-2-3
In for loop start i from 1 to 10
William Paik
2019-2-3
KALYAN ACHARJYA
2019-2-3
Check with
sin_value(i+1)=..same
Before plot, please ensure both (x and sin) have same lengths
William Paik
2019-2-3
KALYAN ACHARJYA
2019-2-3
编辑:KALYAN ACHARJYA
2019-2-3
I am not asking for do that, just check before plot. Plot x,y, here both must have same lengths
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!