how to give input for functions
Show older comments
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 = 9;
[Pi, FVal] = fminbnd(@(x) myFunc(x,P0),0,7);
getting error: Error using myFunc (line 4)
Not enough input arguments.
Accepted Answer
More Answers (1)
shobi swaminathan
on 28 Jan 2014
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!