help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help request


From: Martin Weiser
Subject: Re: help request
Date: Sun, 28 Sep 2008 00:56:37 +0200 (CEST)

On Sat, 27 Sep 2008, a89ur345 wrote:

Hello,

I am trying to write Octave code that will take a user supplied .csv file 
consisting of X rows by 3 columns. The first column is the initial value, the 
second is the increment amount (by addition to initial value), and the third 
column is the final value. The increment value can be either pos or neg, 
integer or decimal value, and the total times a first column variable is 
incremented can differ between each. This data will then be written to another 
.csv file with other calculations completed on this data later.

The goal is to create a matrix that creates all possible combinations of all 
the first column variables by taking each variable and creating a combination 
with the other X first column variables but also incrementing each one 
individually and then creating those combinations.

Since I don't know ahead of time how many times each individual first column 
variable will be incremented I run into mis-match of range errors and not 
capturing all possible combinations.� I have also tried using ndgrid function 
along with nested do while loops/ for loops and encounter same errors.

I am using Octave ver 3.0.1

Any help would be greatly appreciated.
Thanks


Hi,
sorry, I have tried several minutes, but I simply do not understand ...
(if this is just a problem of my low capabilities, I kindly ask all of the readers for pardon)
You mention 3 columns in the original input, but I have not found any
action with the third column in the following text.
Can you please give me (us?) more specific description/example?
Let us for example suppose that this is an input:
1, 2, 3
2, -2, 0
3, 1.5, 4.5
Is this input correct? If yes, what should be the output?
Something like:
3 3 4
3 0 5
4 5 4.5
([1,1]+[1,2], [1,1]+[2,1], [1,1]+[3,1]
 [2,1]+[1,1], [2,1]+[2,2], [2,1]+[3,1]
 [3,1]+[1,1], [3,1]+[2,1], [3,1]+[3,2])
Or something completely different?

Well, I guess that this is not the answer you have been waiting for,
but I have a strong feeling that more precise question will enlarge the pool of potential answerers...
I hope that this helps at least a bit...
Martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]