changeset 6896:a56dbcaed9c6 octave-forge

Use 'char' instead of 'str2mat'
author hauberg
date Sat, 20 Mar 2010 19:53:25 +0000
parents c4c1db99b77c
children 77a24624561e
files main/econometrics/inst/gmm_example.m main/econometrics/inst/gmm_results.m
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/econometrics/inst/gmm_example.m	Sat Mar 20 19:50:32 2010 +0000
+++ b/main/econometrics/inst/gmm_example.m	Sat Mar 20 19:53:25 2010 +0000
@@ -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};
 
--- a/main/econometrics/inst/gmm_results.m	Sat Mar 20 19:50:32 2010 +0000
+++ b/main/econometrics/inst/gmm_results.m	Sat Mar 20 19:53:25 2010 +0000
@@ -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);