Info

This question is closed. Reopen it to edit or answer.

Not enough input arguments while implementing Function

1 view (last 30 days)
I got an error while attempting to run the following function (Not enough input arguments in the first line regarding the "rampconst,mingeardiff"): (Can you please help me to resolve it?)
function [upshift_spd, downshift_spd, pedal_pos] = Calc_Shift_Map_RO(rampconst,mingeardiff)
updowndiff = 3;
gear1pts = [9.95 12.75 15.5 19.5]';
pedalpos = [0.1 0.4 0.5 0.9];
newpts = zeros(length(gear1pts),5);
newpts(:,1) = gear1pts;
for i=2:size(newpts,2)
newpts(:,i) = newpts(:,1)+(i-1)*mingeardiff+rampconst*(i-1)*pedalpos';
end
upshift_spd = newpts + (updowndiff/2);
downshift_spd = newpts - (updowndiff/2);
pedal_pos = pedalpos;
  1 Comment
John D'Errico
John D'Errico on 16 Apr 2016
You DON'T run a function.
This is why you got the input arguments error.

Answers (0)

Community Treasure Hunt

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

Start Hunting!