Write a user defined function to implement the following mathematical function :
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Write a user defined function to implement the following mathematical function : please note that x is angle in degrees.
f (x) = cos (x)    if  0  <  x   <  90
f(x)= sin(x)      if  90   <   x   <  180
f(x)=tan(x)         otherwise
0 comentarios
Respuestas (1)
  David Hill
      
      
 el 21 de Oct. de 2020
        function y = f(x)
 if x>0&&x<90
    y=cosd(x);
 elseif x>90&&x<180
    y=sind(x);
 else
    y=tand(x);
 end
0 comentarios
Ver también
Categorías
				Más información sobre Language Fundamentals en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

