help-octave
[Top][All Lists]
Advanced

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

Re: help request


From: joe_001
Subject: Re: help request
Date: Mon, 29 Sep 2008 06:12:47 -0700 (PDT)

For further clarification (sorry for earlier)

The third column is the final value that the first column value is
incremented to. For example if you have a 3 X 3 input file with the first
row = 1, 1, 4   then the total group of variants of this row would be 1, 2,
3, 4.   The first column value "1", incremented by the second column value
"1" up until the third column value of "4".

My test case is a 3 X 3 matrix with the first row = 1, 1, 4,  the second row
= 2, 2, 4 and the third row = 4, 0.5, 6.  When you expand all three rows out
and then figure out all the possible combinations you will end up with a
total of 40 different combinations in a matrix with 40 rows and 3 columns.
The first few rows of the final matrix would be something like .. 1, 2, 6, 
then 2, 2, 6, then 3, 2, 6, then 4, 2, 6, then 1, 4, 6 and so on ..

But for the actual problem instead of a 3 X 3 matrix you would have a M X 3
matrix, where the M could be as high as 70 or 80 variables. The end result
will be a matrix of all possible design criteria to run analysis on all
possible combinations.




Martin Weiser-4 wrote:
> 
> 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
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 

-- 
View this message in context: 
http://www.nabble.com/help-request-tp19706219p19723599.html
Sent from the Octave - General mailing list archive at Nabble.com.




reply via email to

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