Develop a live script to calculate:
𝑁= ((5x-2)*ln(sqrt(x))) / ((x^(2)-1)*(sin(x)))
Calculate N when
(a) x = 2.4,
(b) x = 12.1,
(c) x = 0.07,
and (d) x = 1.

5 件のコメント

KSSV
KSSV 2020 年 9 月 26 日
What have you attempted?
Steven Lord
Steven Lord 2020 年 9 月 26 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Benjamin Johnston
Benjamin Johnston 2020 年 9 月 26 日
x=2.4
N=((5*x)-2)*(log(sqrt(x)))/(x^(2)-1)*(sin(x))
I've tried a couple equations and checked with my calculator for all and none have worked. This equation is the closest I've got.
Benjamin Johnston
Benjamin Johnston 2020 年 9 月 26 日
I'm just struggling on how to translate the equation from the hw onto matlab.
Walter Roberson
Walter Roberson 2020 年 9 月 26 日
Could you post an image of the equation to be programmed ?

サインインしてコメントする。

回答 (1 件)

Steven Lord
Steven Lord 2020 年 9 月 26 日

0 投票

When you're checking with your calculator, are you taking the sine of x in degrees (for which the corresponding function in MATLAB would be sind) or in radians (for which sin is the correct function)?
You should also be careful with your parentheses.
x1 = 1/(2)*2 % divide 1 by 2 and multiply the result by 2 = 1
x2 = 1/(2*2) % multiply 2 by 2 and divide 1 by the result = 0.25

1 件のコメント

Benjamin Johnston
Benjamin Johnston 2020 年 9 月 26 日
I've checked both in degrees and radians mode. Idk what else to do with my parenthesis, I feel like I've tried everything. thanks though.

サインインしてコメントする。

質問済み:

2020 年 9 月 26 日

コメント済み:

2020 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by