Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Not enough input arguments

Asked by Lei Zhang

Lei Zhang

on 17 Jan 2013
function fout=ff(pop)
fout=pop(:,1).^2+pop(:,2).*pop(:,3)+pop(:,4);
end

Where pop is an known 100*4 matrix

0 Comments

Lei Zhang

Lei Zhang

Products

No products are associated with this question.

1 Answer

Answer by Shashank Prasanna

Shashank Prasanna

on 17 Jan 2013
function fout=ff(pop) 
 fout=pop(:,1).^2+pop(:,2).*pop(:,3)+pop(:,4); 
end
>> pop = rand(100,4);
>> ff(pop)

This works perfectly fine for me.

How are you calling your function?

0 Comments

Shashank Prasanna

Shashank Prasanna

Contact us