Does this formula wrote in correct way in the matlab
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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
Antworten (2)
Roger Stafford
am 21 Aug. 2014
2 Stimmen
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.
1 Kommentar
shayma mohammed
am 21 Aug. 2014
Adam
am 20 Aug. 2014
0 Stimmen
Looks like it. Does it give the correct answers for given inputs? If so then it is ,assuming you test edge cases.
2 Kommentare
shayma mohammed
am 22 Aug. 2014
Roger Stafford
am 22 Aug. 2014
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.
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!