My graph is blank.
1 view (last 30 days)
When I run the code I get an answer, but the plot always comes up blank, with a scale that does not match the output of the function.
k = 1:10
x = 0.1:0.1:1
bug = 0
for a = 1 : length(k)
this_k = k(a)
this_x = x(1:a)
bug = bug + sin((factorial(k).^2).*x)/factorial(k)
Preethi on 21 Nov 2016
Edited: Walter Roberson on 21 Nov 2016
variable bug is not a vector its a scalar value so when you plot you try to plot the graph is blank.
initialize bug as array with zeros and then use in loop
start for loop index from 2