[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
set array values from 3 vectors
From: |
carbonmetrics |
Subject: |
set array values from 3 vectors |
Date: |
Tue, 30 Aug 2011 03:25:47 -0700 (PDT) |
I have a canvas=zeros(1000,365), in which 1000=number of projects and
365=days of the year,
a startdate and an enddate vector, and a value vector.
what i would like to do is to place the values [value vector] in the canvas
array,
where the indices are > startdate and < enddate.
if the canvas would be a vector, and the value a scalar then
'canvas(startdate:enddate)=value' would do the job.
I can't get it done doing a loop, but of course I would much rather
vectorize the code.
It looks like a frequent question, but I could not find anything on this,
does anybody have an idea?
Thanks!
Henk
--
View this message in context:
http://octave.1599824.n4.nabble.com/set-array-values-from-3-vectors-tp3778381p3778381.html
Sent from the Octave - General mailing list archive at Nabble.com.
- set array values from 3 vectors,
carbonmetrics <=