added solutions to function erecises
This commit is contained in:
8
programming/code/boltzmann.m
Normal file
8
programming/code/boltzmann.m
Normal file
@@ -0,0 +1,8 @@
|
||||
function y = boltzmann( x, k )
|
||||
% computes the boltzmann function
|
||||
% x: scalar or vector of x values
|
||||
% k: slope parameter of boltzman function
|
||||
% returns y-values of boltzmann function
|
||||
y = 1./(1+exp(-k*x));
|
||||
end
|
||||
|
||||
3
programming/code/plotboltzmann.m
Normal file
3
programming/code/plotboltzmann.m
Normal file
@@ -0,0 +1,3 @@
|
||||
p = boltzmann(voltage, a);
|
||||
plot(voltage, p)
|
||||
y = -1;
|
||||
Reference in New Issue
Block a user