In the vector write example program we allocate and write out a
100-dimensional vector, while in the vector read example program we
allocate and read in a 10-dimensional vector.
Fix this problem by making the vector write example operate on
a 10-dimensional vector.
---
doc/examples/vectorw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/examples/vectorw.c b/doc/examples/vectorw.c
index f25468b..256cefb 100644
--- a/doc/examples/vectorw.c
+++ b/doc/examples/vectorw.c
@@ -5,9 +5,9 @@ int
main (void)
{
int i;
- gsl_vector * v = gsl_vector_alloc (100);
+ gsl_vector * v = gsl_vector_alloc (10);
- for (i = 0; i < 100; i++)
+ for (i = 0; i < 10; i++)
{
gsl_vector_set (v, i, 1.23 + i);
}
--
1.7.10.4
>From 9c8cc522c6a43ffac5ef83bca761349185d8c03b Mon Sep 17 00:00:00 2001
From: Amos Waterland <[email protected]>
Date: Mon, 29 Dec 2014 01:51:53 +0000
Subject: [PATCH] Make the vector write example consistent with the vector
read example.
In the vector write example program we allocate and write out a
100-dimensional vector, while in the vector read example program we
allocate and read in a 10-dimensional vector.
Fix this problem by making the vector write example operate on
a 10-dimensional vector.
---
doc/examples/vectorw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/examples/vectorw.c b/doc/examples/vectorw.c
index f25468b..256cefb 100644
--- a/doc/examples/vectorw.c
+++ b/doc/examples/vectorw.c
@@ -5,9 +5,9 @@ int
main (void)
{
int i;
- gsl_vector * v = gsl_vector_alloc (100);
+ gsl_vector * v = gsl_vector_alloc (10);
- for (i = 0; i < 100; i++)
+ for (i = 0; i < 10; i++)
{
gsl_vector_set (v, i, 1.23 + i);
}
--
1.7.10.4