Info

此问题已关闭。 请重新打开它进行编辑或回答。

Not enough input arguments while implementing Function

1 次查看(过去 30 天)
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;

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by