Task for generating a wave
Show older comments
Accepted Answer
More Answers (1)
Ameer Hamza
on 8 Oct 2020
unique code for Sine wave
What about using a taylor series?
N = 20;
x = 0.1;
y = @(xv) arrayfun(@(x) sum((-1).^(0:N-1).*x.^(2*(1:N)-1)./factorial(2*(1:N)-1)), xv);
xv = linspace(0, 2*pi);
yv = y(xv);
plot(xv, yv)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!