Filter löschen
Filter löschen

degrees to radians

3 Ansichten (letzte 30 Tage)
Essence
Essence am 1 Sep. 2011
I'm currently trying to find the sin of coordinates which are not in the form of simple degrees i.e it is in the form 123d 43m 15s. How do I write this command in terms of cos and sin? I've tried several commands but I cannot seem to get it right it's saying 'invalid statement'. How do I perform this function?

Akzeptierte Antwort

Saneem Ahmed
Saneem Ahmed am 1 Sep. 2011
I dont know if there is an inbuilt function. but you can do like this. let 'd' be the degree ,'m' and 's' be the minute and second.Then you can put an equation to convert this format into decimal.
degree=d+(m/60)+(s/3600);
rad=degtorad(degree);
  1 Kommentar
Saneem Ahmed
Saneem Ahmed am 1 Sep. 2011
or try
degree=dmstodegree([d m s]);
rad=degtorad(degree);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Andrei Bobrov
Andrei Bobrov am 1 Sep. 2011
angleInDegMinSec = [123 43 15]
angleInDegrees = angleInDegMinSec*[1;[1;1/60]/60]
sind(angleInDegrees) % sin
cosd(angleInDegrees) % cos
with Mapping Toolbox
angleInDegMinSec = [123 43 15]
angleInDegees = dms2degrees([123 43 15])
sind(angleInDegrees) % sin
cosd(angleInDegrees) % cos
radians
angleInDegMinSec = [123 43 15]
angleInRadians = angleInDegMinSec*[1;[1;1/60]/60]/180*pi
cos(angleInRadians)
sin(angleInRadians)
or with Mapping Toolbox
angleInRadians = degtorad(dms2degrees(angleInDegMinSec))
cos(angleInRadians)
sin(angleInRadians)

Kategorien

Mehr zu Geographic Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by