To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
Hello, I try to call function in my main code. However, It says "Not enough input argument" when i call it. here is my code, Could youplease help me what argument i forget to add
% function [ breedingpopulation ] = calcbreedingpop(nperiods, nstands, area, CVOL, DVOL, breedingpop) %UNTITLED4 Summary of this function goes here % Detailed explanation goes here
for istand = 1:nstands harvper=harvsched(istand); if harvper >0 harvvol(harvper) = harvvol(harvper) + area(istand) * (CVOL(istand,harvper)+ DVOL(istand,harvper)); end end totvol = sum (harvvol); penalty = calcPenalty(harvvol,harvgoal,underpweight,overpweight,nperiods, npv, npvgoal, unpvweight, onpvweight); breedingpop(i).time=time; breedingpop(i).penalty=penalty; breedingpop(i).sched=harvsched; bestsched=harvsched end
No products are associated with this question.
No, you should not put the nested functions in the argument list.
In the calling function, is breedingpop a function or a variable? I think the problem is that when you call
breedingpopulation = calcbreedingpop(nperiods, nstands, area, CVOL, DVOL, breedingpop)
your code believes that breedingpop is a function that is itself expecting some inputs.