To find minimum of a variable
Show older comments
Pls can you modify the below code
function Y = myFunc(P,P0) N = 2; Pa = 9;
k = floor((P0*N/Pa));
Y = F(P)+k*F(N*P0-P*k);
function Fp = F(P)
R = 3;
beta = 8;
Fp = 1 - exp(-((2^R-1)./P).^(beta/2));
%Step 2: Minimize it within the bounds:
P0 = 7;
[Pi, FVal] = fminbnd(@(x) myFunc(x,P0),0,1.1);
Pls modify the code such that P and P0 is as mentioned below
wherein P0 varies from 1 to 10 and P = [0, Pb]∪ ((N*P0)/(k+1))....( ∪ refers to union here)
Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!