How to...live script

3 visualizaciones (últimos 30 días)
Benjamin Johnston
Benjamin Johnston el 26 de Sept. de 2020
Comentada: Walter Roberson el 26 de Sept. de 2020
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 comentarios
Benjamin Johnston
Benjamin Johnston el 26 de Sept. de 2020
I'm just struggling on how to translate the equation from the hw onto matlab.
Walter Roberson
Walter Roberson el 26 de Sept. de 2020
Could you post an image of the equation to be programmed ?

Iniciar sesión para comentar.

Respuestas (1)

Steven Lord
Steven Lord el 26 de Sept. de 2020
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 comentario
Benjamin Johnston
Benjamin Johnston el 26 de Sept. de 2020
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by