I tried to simulate the first example and I did not touch anything else to ruin them,
but these errors come up usually
Error using dt (line 13)
Not enough input arguments.
Error in kspaceFirstOrder2D (line 484)
disp([' dt: ' scaleSI(dt) 's, t_end: ' scaleSI(t_array(end)) 's, time steps: ' num2str(length(t_array))]);
I guess thats because in main script this line is used without arguments while it needs an input like B!
-----------------
function D = dt(B)
-----------------
line 484: disp([' dt: ' scaleSI(dt) 's, t_end: ' scaleSI(t_array(end)) 's, time steps: ' num2str(length(t_array))]);