フィルターのクリア

help me with the coce

1 回表示 (過去 30 日間)
Merapelo CHamme
Merapelo CHamme 2013 年 12 月 1 日
編集済み: Walter Roberson 2013 年 12 月 2 日
Write a simple trig calculator script which gives the user the choice to calculate sin(x), cos(x) or tan(x) of an angle. Your script should:
display the menu and read in the selection
check if the selection is valid and if not display an error message
use a switch...case statement to decide which calculation to do
 read in the angle and tell the user to enter the angle in degrees
prevent errors such as trying to calculate the value of (tan 90o)
display the result on screen.
Example menu :
Trig Function Calculator Program
1: sin(x)
2: cos(x)
3: tan(x)
0: exit program

回答 (1 件)

Image Analyst
Image Analyst 2013 年 12 月 2 日

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by