Does this formula wrote in correct way in the matlab

hello i have this formula y= -0.0459 E/(√(E²-m²))/(1-e^(0.0459 E/(√(E²-m²)))).√(E²-m²)
In matlab y= ((-0.0459*x./sqrt(x.^2-m^2))./(1-exp(0.0459*x./sqrt(x.^2-m^2)))).*sqrt(x.^2-m^2)
does this correct please

Answers (2)

At the right end of your formula, ".√(E²-m²)", are you sure the dot signifies multiplication? If it were to mean that, as I have pointed out in your previous thread, this would cancel out the earlier division by the same value, "√(E²-m²)". That suggests that the dot may signify an operation other than multiplication, though I am at a loss as to what it might be. You had better take a more careful look at wherever you obtained this formula from.
Looks like it. Does it give the correct answers for given inputs? If so then it is ,assuming you test edge cases.

2 Comments

it gives an imaginary number
Again, the reason for that is that you are using values of x that lie between -m and +m which produces the square root of a negative number, and that gives rise to imaginary and complex numbers. There is no mystery here.

This question is closed.

Tags

No tags entered yet.

Asked:

on 20 Aug 2014

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!