# [Scilab-users] How to specify angle in degree and minutes

4 messages
Open this post in threaded view
|

## [Scilab-users] How to specify angle in degree and minutes

 Hello Everybody, I need to calculate cosine of bunch of angles that comes as Degree Minutes Seconds (e.g. 44d32m11s). What is the best way to do it in scilab? Does cosd() accept some notation that is similar to one above? Thank you! -Dmitry _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: How to specify angle in degree and minutes

 Hello, > De : Dmitry Samersoff > Envoyé : mardi 16 mars 2021 19:59 > > I need to calculate cosine of bunch of angles > that comes as Degree Minutes Seconds (e.g. 44d32m11s). > > What is the best way to do it in scilab? If you have a vector of numbers angle = [dd, mm, ss], it is rather easy to convert it into a decimal number, e.g. angle(1) + (angle(2) + angle(3)/60)/60 If you have a character string, this means parsing. Have a look at tokens() https://help.scilab.org/docs/6.1.0/en_US/tokens.htmle.g. --> tokens("44d32m11s", ["d", "m", "s"])  ans  =   "44"   "32"   "11" > Does cosd() accept some notation that is similar to one above? No, https://help.scilab.org/docs/6.1.0/en_US/cosd.htmlHTH, Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users