How to solve for the root of this function?

2 Ansichten (letzte 30 Tage)
Marc Santos
Marc Santos am 3 Feb. 2017
Beantwortet: Marc Santos am 4 Feb. 2017
Let beta=0.95 cv = 0.25 u = 800
I need to solve for x-hat in order to find Q. I used the fzero function but it is not giving me the correct answer.
The code I created is: q=fzero('0.25*(normpdf(x,800,200)-(1-normcdf(x,800,200))*((x-800)/200))-1+0.95',1)
A worked example is shown below:
Any help would be very much appreciated!
The article is titled: "On Computing Order Quantities for Perishable Inventory Control with Non-stationary Demand" by Alejandro G. Alcoba et al. (2015)
  2 Kommentare
Stephen23
Stephen23 am 3 Feb. 2017
Bearbeitet: Stephen23 am 3 Feb. 2017
@Marc Santos: please edit your question and upload the code you have been trying by clicking the paperclip button. You write that you have "used the fzero function", so you have some code already, and it should be much easier for us to fix your code than to type out that whole equation again.
Marc Santos
Marc Santos am 3 Feb. 2017
Alright will do. Thanks

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Marc Santos
Marc Santos am 4 Feb. 2017
Hi, I already solved it
Thank you to those who tried.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Computations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by