필터 지우기
필터 지우기

Write a user defined function to implement the following mathematical function :

조회 수: 1 (최근 30일)
Majid Alomari
Majid Alomari 2020년 10월 21일
답변: David Hill 2020년 10월 21일
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

답변 (1개)

David Hill
David Hill 2020년 10월 21일
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

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by