I'm getting Not enough input arguments

7 Ansichten (letzte 30 Tage)
Gilbert Valentino
Gilbert Valentino am 5 Nov. 2020
Bearbeitet: madhan ravi am 5 Nov. 2020
function [val] = S_inf (V, theta)
k = 2;
val = 1./(1+exp(-(V-theta)./k));
end
x = S_inf(10, -44);

Antworten (1)

madhan ravi
madhan ravi am 5 Nov. 2020
Your last line should be before the function
  1 Kommentar
madhan ravi
madhan ravi am 5 Nov. 2020
Bearbeitet: madhan ravi am 5 Nov. 2020
x = S_inf(10, -44);
function [val] = S_inf (V, theta) % saved in a separate file named S_inf.m if your using version prior to 2016b
k = 2;
val = 1./(1+exp(-(V-theta)./k));
end

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by