From: <ha...@us...> - 2010-03-20 19:53:31
|
Revision: 7082 http://octave.svn.sourceforge.net/octave/?rev=7082&view=rev Author: hauberg Date: 2010-03-20 19:53:25 +0000 (Sat, 20 Mar 2010) Log Message: ----------- Use 'char' instead of 'str2mat' Modified Paths: -------------- trunk/octave-forge/main/econometrics/inst/gmm_example.m trunk/octave-forge/main/econometrics/inst/gmm_results.m Modified: trunk/octave-forge/main/econometrics/inst/gmm_example.m =================================================================== --- trunk/octave-forge/main/econometrics/inst/gmm_example.m 2010-03-20 19:50:32 UTC (rev 7081) +++ trunk/octave-forge/main/econometrics/inst/gmm_example.m 2010-03-20 19:53:25 UTC (rev 7082) @@ -36,7 +36,7 @@ momentargs = {k}; # needed to know where x ends and w starts # additional args for gmm_results -names = str2mat("theta1", "theta2", "theta3", "theta4", "theta5"); +names = char("theta1", "theta2", "theta3", "theta4", "theta5"); gmmtitle = "Poisson GMM trial"; control = {100,0,1,1}; Modified: trunk/octave-forge/main/econometrics/inst/gmm_results.m =================================================================== --- trunk/octave-forge/main/econometrics/inst/gmm_results.m 2010-03-20 19:50:32 UTC (rev 7081) +++ trunk/octave-forge/main/econometrics/inst/gmm_results.m 2010-03-20 19:53:25 UTC (rev 7082) @@ -25,7 +25,7 @@ # momentargs: (cell) additional inputs needed to compute moments. # May be empty ("") # names: vector of parameter names -# e.g., names = str2mat("param1", "param2"); +# e.g., names = char("param1", "param2"); # title: string, describes model estimated # unscale: (optional) cell that holds means and std. dev. of data # (see scale_data) @@ -87,7 +87,7 @@ junk = "X^2 test"; df = n - k; if df > 0 - clabels = str2mat("Value","df","p-value"); + clabels = char("Value","df","p-value"); a = [n*obj_value, df, 1 - chisquare_cdf(n*obj_value, df)]; printf("\n"); prettyprint(a, junk, clabels); @@ -97,7 +97,7 @@ # results for parameters a =[theta, se, theta./se, 2 - 2*normal_cdf(abs(theta ./ se))]; - clabels = str2mat("estimate", "st. err", "t-stat", "p-value"); + clabels = char("estimate", "st. err", "t-stat", "p-value"); printf("\n"); prettyprint(a, names, clabels); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |