How do I write this Natural Log in MATLAB?

2 visualizaciones (últimos 30 días)
Patrick Dorn
Patrick Dorn el 14 de Mzo. de 2021
Comentada: Patrick Dorn el 14 de Mzo. de 2021
Hi, I need to write the following log (attached as a screenshot) in MATLAB.
This is how I have tried to write it but it is returning a wrong value. Would anybody be able to tell me what is wrong with my code?
Sg2 = log(1-(Cdo-u*Clmin)/(T/W - u * Clrot))

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Mzo. de 2021
Did you try it with the proper parentheses?
Sg2 = log(1-(Cdo-u*Clmin) / ((T/W - u) * Clrot))
What values are you passing in? What do you expect as a result and what are you getting? Answer after reading the posting guidelines:
  1 comentario
Patrick Dorn
Patrick Dorn el 14 de Mzo. de 2021
Just tried... it worked and I feel a bit silly. I had read over it so many times that I had gone parentheses blind. Thanks for your help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by