How do I find the base of a right angle triangle b=xcos(a) in matlab.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
('x' has to be a positive value and 'a' has to entered in degrees then converted to radian)
1 Kommentar
Antworten (1)
Andres Yie
am 26 Mär. 2017
Use the comands:
a = input('Enter a in radians')
x = input('Enter x')
a = rad2deg(a) %Converts to degrees
b = x*cosd(a);
Also you can skip the radinas and use the cos() function that accepts the argument in radians.
1 Kommentar
Walter Roberson
am 26 Mär. 2017
I think the intent was more
a = input('Enter a in degrees');
x = input('Enter x');
b = x*cosd(a);
Siehe auch
Kategorien
Mehr zu Dates and Time 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!