help-octave
[Top][All Lists]
Advanced

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

Re: set array values from 3 vectors


From: carbonmetrics
Subject: Re: set array values from 3 vectors
Date: Tue, 30 Aug 2011 09:30:56 -0700 (PDT)

No worries, here is more explanation. 

I have a list of 1000 projects that are producing widgets. 
They all have different start and end dates of production.
They also have different production rates per day.
I would like to see the joint production of these projects per day [sum of
the columns].

So I figured I could make a vector canvas=zeros(1000,365), so every 'cell'
is a day of production for a project.
Say that one project produced 30 widgets in the period 60 to 90 [in days
since 1/1/2010].
Then the indices 60 to 90 of the canvas array need to be populated with 30. 
If this was a vector, I could do: canvas(60:90)=30. 
The question is how to deal with the other 999 projects, if possible without
a loop.

Henk

--
View this message in context: 
http://octave.1599824.n4.nabble.com/set-array-values-from-3-vectors-tp3778381p3779172.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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