-5

i need to calculate some expression for all angles from 0 to 90 degrees increments 10 degrees (of cause expression depends on some trigonometrical function). It looks like:

for alpha = 0:10:90
   func(alpha) = c * sin(alpha)
end

Who know how to work with degrees, tell, please

E. Trofimov
  • 92
  • 1
  • 11

1 Answers1

0

It should be:

for 0:pi/18:pi/2
rayryeng
  • 102,964
  • 22
  • 184
  • 193
E. Trofimov
  • 92
  • 1
  • 11
  • You could also just replace `sin` with `sind` and keep the loop indices the same. That's the easier change. – rayryeng Mar 25 '17 at 06:58