How to solve for the root of this function?

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 Comments

Stephen23
Stephen23 on 3 Feb 2017
Edited: Stephen23 on 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.
Alright will do. Thanks

Sign in to comment.

 Accepted Answer

Hi, I already solved it
Thank you to those who tried.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!