How do you write this equation correctly in MATLAB?

1 Ansicht (letzte 30 Tage)
Andrew Emery
Andrew Emery am 27 Jun. 2018
Beantwortet: Star Strider am 27 Jun. 2018

Akzeptierte Antwort

Star Strider
Star Strider am 27 Jun. 2018
That is difficult to read. It appears to be this:
p = @(delta,sigma) (exp(-sigma./delta)./delta) .* (sigma >= 0);
It will default to being 0 for sigma < 0, so it is not necessary to specifically include that condition.
Call the ‘p’ anonymous function with the two arguments as you would any other function.

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by