Filter löschen
Filter löschen

how to solve this equation

1 Ansicht (letzte 30 Tage)
Kanav Vij
Kanav Vij am 28 Jun. 2015
Beantwortet: Walter Roberson am 28 Jun. 2015
I'm trying to solve this equation:
c=(sind(d)*sind(L)*cosd(b)) - (sind(d)*cosd(L)*sind(b))+(cosd(d)*cosd(L)*cosd(b)*cosd(h))+(cosd(d)*sind(L)*sind(b)*cosd(h))==0
solve for h, L=b=28.6
but I'm getting error:
??? Error using ==> cosd at 16
Argument should be real.
I'm using MATLAB 2010a

Antworten (2)

Romil Shah
Romil Shah am 28 Jun. 2015
Bearbeitet: Walter Roberson am 28 Jun. 2015
%Using any value gives a proper answer...please try again
L=28.6;
b=28.6;
d=28.6;
h=28.6
c=(sind(d)*sind(L)*cosd(b)) - (sind(d)*cosd(L)*sind(b))+(cosd(d)*cosd(L)*cosd(b)*cosd(h))+(cosd(d)*sind(L)*sind(b)*cosd(h));
c =
0.7709
  1 Kommentar
Kanav Vij
Kanav Vij am 28 Jun. 2015
I want to find the value of h for c=0

Melden Sie sich an, um zu kommentieren.


Walter Roberson
Walter Roberson am 28 Jun. 2015
In order for that to have happened, your "d" would have had to have been a complex number. For example if you had used
d = i;
then the problem could have occurred, as "i" is the imaginary unit, sqrt(-1). So is "j".

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by