Aptech Systems, Inc. Worldwide Headquarters
Aptech Systems, Inc.
2250 East Germann Road, Suite #10
Chandler, AZ 85286
Ready to Get Started?
For Pricing and Distribution
Training & Events
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Q&A: Register and Login
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Available across the globe, you can have access to GAUSS no matter where you are.
Recent Tagsapplications character vectors CMLMT Constrained Optimization covariance matrix datasets dates dlibrary dllcall Editor error error handling errors Excel FANPACMT file i/o GAUSS Engine graphics GUI hardware histogram hotkeys installation Java API linux loading data localization loops Matlab convert matrices matrix manipulation Maxlik MaxLikMT Optmum output pgraph graph PQG graphics procs random numbers simulation string functions strings threading Time Series writing data
Time Series 2.0 MT
Find out more now
Time Series MT 2.1
How can I automate the ‘save’ of variables with sequential names
I would like to save a number of variables to a file with sequential variables names, for example x1, x2, x3, etc. Is there a way to abstract this, and put it in a loop so that I do not have to type:
save x1; save x2; save x3;
Here is a procedure that will accomplish your task:
proc (0) = saveSeqVars(varname, nvars); local outname, tmp, i; for i(1, nvars, 1); outname = varname$+ftos(i, "%*.*lf", 0, 0); tmp = varget(outname); save ^outname=tmp; endfor; endp;
Using this function, the call:
would be equivalent to:
save myvar1; save myvar2; save myvar3;