That is the scrip that someone recommended to me but my professor say that was wrong, and that I have to use the student version of matlab to do it, with the basic thing!!

`x_deg = input('Input angle in degrees: ');x = degtorad(x_deg);sumTerms = 0;n = 0;E = Inf;while E > 1e-6 a = ((-1)^n * x^(2 * n + 1)) / factorial(2 * n + 1); prevSum = sumTerms; sumTerms = sumTerms + a; if n ~= 0 E = abs((sumTerms - prevSum) / prevSum); end n = n + 1;endfprintf('Value of sin(%0.1f) is: %0.5f\n', x_deg, sumTerms`

I have the student version, so something in this program is not letting me run the script, But also my professor say that was wrong and that I have to make the program stop when E<=0.000001?

## Best Answer