How do I find the base of a right angle triangle b=xcos(a) in matlab.

1 visualización (últimos 30 días)
Julie Wanjiru
Julie Wanjiru el 15 de Feb. de 2017
Comentada: Walter Roberson el 26 de Mzo. de 2017
('x' has to be a positive value and 'a' has to entered in degrees then converted to radian)
  1 comentario
KSSV
KSSV el 15 de Feb. de 2017
Editada: KSSV el 15 de Feb. de 2017
It is such simple....there is inbuilt function cos . Read about it.

Iniciar sesión para comentar.

Respuestas (1)

Andres Yie
Andres Yie el 26 de Mzo. de 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.

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by