Path: news.mathworks.com!newsfeed.mathworks.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail
From: Waldemar Krzok <waldemar.krzok@ukbf.fu-berlin.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: simple but urgent
Date: Wed, 06 Oct 2004 17:26:14 +0200
Organization: Freie Universitaet Berlin
Lines: 33
Message-ID: <41640E96.9070106@ukbf.fu-berlin.de>
References: <fz21vkbs48zl@legacy> <fXS8d.1503$Ny6.2541@mencken.net.nih.gov>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 2mJgVDEUNjZEPBr9IEzQ2Qn0E1xAP7qyrEXhPTfydBM/2IgxExLSue
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: de-de, de
Xref: news.mathworks.com comp.soft-sys.matlab:233498




>>x=zeros(1000,1);
>>
>>for i=1:length(Summe)
>>%   for j=1:5
>>       if Summe(i,1)>=25, x=Summe(i,:)
>>
>>%         & (B(j,1) >= 0) >= 3 ;
>>end
>>end
>>
>>Matlab gives me for x just one value (1x1), but there a many values in
>>'Summe' which are >=0 ???
>>
>>And how can I predefine x without knowing the exact dimension of x
>>(lines) in advance?
>>
>>
> 
> 
> Hi Lex,
> You're clearly new to ML, and probably to programming. I strongly urge you 
> to read the getting started docs for this program. Besides Waldemar's 
> solution to your problem, ML has many ways of making dealing with these 
> kinds of problems a breeze. For instance:
> 
> x = Summe(Summe>=25);


he needs to compare Summe(:,1), but there are still many ways to do it.

Waldemar