Re: Can this be vectorised?
- From: "marc laetzel" <marc@xxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 03:29:15 -0400
DaveW wrote:
.
Hi,
I've got two vectors X and Y. I want to create a new vector Z which
has
the same number of entries as Y and each element the result of a
conditional expression applied to the original X i.e.
Z = X(X < Y);
This fails because both X and Y are vectors. Is there a syntax that
allows me to iterate on each y in Y without using a for loop?
i.e.
i=1:length(Y)
X(i) = X(X<Y(i));
end
Dave
- References:
- Can this be vectorised?
- From: DaveW
- Can this be vectorised?
- Prev by Date: Re: print('-dpng' ...
- Next by Date: Re: Load Command - Unix vs. PC
- Previous by thread: Re: Can this be vectorised?
- Next by thread: Re: Can this be vectorised?
- Index(es):
Relevant Pages
|