Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Not enough input arguments while implementing Function

1 Ansicht (letzte 30 Tage)
Moustafa Abouelkheir
Moustafa Abouelkheir am 16 Apr. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
John D'Errico
John D'Errico am 16 Apr. 2016
You DON'T run a function.
This is why you got the input arguments error.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by