|
From: | James S. Meyer |
Subject: | nargout flagged as invalid function in mechanics package, function mdsim |
Date: | Fri, 12 Jul 2013 11:15:09 -0500 |
I have been attempting to run the demos (demo1, demo2, demo3) in the mechanics package, molecular dynamics section, but the program crashes in one of the functions mdsim by flagging the narg operator in row 76, column 3 with the message octave:2> mdjim (This is just a copy of the first demonstration program). octave:2> mdjim error: nargout: invalid function error: called from: error: C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\mechanics-1.3.1\molecularDynamics\mdsim.m at line 76, colu mn 3 error: C:\Users\jsmeyer.STGREGORYS\mdjim.m at line 6, column 12 The calling program looks like this: N = 6; P0 = linspace(-0.5+1/(N-1),0.5-1/(N-1),N).'; V0= zeros(N,1); nT=80; tspace = linspace(0,2,nT); [t P V] = mdsim('demofunc1',tspace, P0,V0,'timestep',10^-3); figure (1) plot (P.',t,'.'); xlabel ("Position") ylabel("time") axis tight disp ("Initial values") disp( sum([V(:,1) P(:,1)],1)) % velocity and position of the center of mass are conserveddisp("Final values") disp(sum ([V(:,end) P(:,end)],1) ) %--------------------------------------------------------- % 1D particles with Lennard-Jones potential and period boundaries. mdsim is in the mechanics package and is probably too long to e-mail Can anyone spot why “nargout” would be an invalid function in mdsim, line 76, column 3, and if so, how I might rectify the problem Thanks in advance for your comments. jsmeyer |
[Prev in Thread] | Current Thread | [Next in Thread] |