Don t know how to write formula

  • Thread starter Thread starter johnny_mc
  • Start date Start date
  • Tags Tags
    Formula
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
johnny_mc
Messages
2
Reaction score
0
Hi, i have a problem with MATLAB, i just start to use it, and i desperately need help.
Can anyone help me, how can i wrote this formula :

r[1-cos[arc sin (sqrt(2.*R.*DR+DR.^2)+r sin(arc cos (r-k)/r) /r)]]-k

:smile:
 
Physics news on Phys.org
Hi, you may refer to help in Matlab for writing equations. I can give few points
Matlab accepts only open brackets () and not closed brackets in equations.
write arc sin(x) as asin(x)

Always use * for multiplication of two variables and even with brackets
For example k(x+1)(x+2) as k*(x+1)*(x+2)

Hope this helps
 
hi, i wrote equations like this but it did not help, h = r.*(1-cos(asin((sqrt(2.*R.*DR+DR.^2))+r.*sin(acos(r-k)./r)./r)))-k