Computing element by element and in degress

2 ビュー (過去 30 日間)
Charlotte Reed
Charlotte Reed 2020 年 2 月 3 日
回答済み: Allen 2020 年 2 月 3 日
First define and output a vector x with the following values: −180°, −150°, −120°, −90°, −60°, −30°, 0°, 30°, 60°, 90°, 120°, 150°, 180°
Then, calculate and output y = 7 + 4 sin^2 (?) + cos(?).
Use shorthand notation to define x and element-by-element calculations to compute y.
Finally, compute and output the mean of the values in y

回答 (1 件)

Allen
Allen 2020 年 2 月 3 日
Is this a homework assignment?
MATLAB allows you to perform element-wise calculations on arrays using dot notation prior to the mathematical operator.https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html
Also, while most trigonometeric functions default to solve using radians they also have counterparts for solving using degrees.https://www.mathworks.com/help/matlab/trigonometry.html

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by