From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: What a hell is wrong with logical indexing??? Really???
Date: Thu, 6 May 2010 20:03:04 +0000 (UTC)
Organization: Xoran Technologies
Lines: 7
Message-ID: <hrv79o$5qa$>
References: <hrujad$fmn$> <hrukjn$dda$> <hruo0e$5f8$> <hruq21$nef$> <hrv34k$sic$> <hrv49e$fd7$> <hrv5v5$742$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1273176184 5962 (6 May 2010 20:03:04 GMT)
NNTP-Posting-Date: Thu, 6 May 2010 20:03:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:633283

"Sergei Koulayev" <> wrote in message <hrv5v5$742$>...

>Then later at the line #133 I try to write X(3)=pi. I really want this "pi" to be there! 
Instead of doing just what I told him to do - just put the number in there - Matlab is *invisibly* correcting my operation, giving me a wrong answer that I didn't expect. 

But then why wouldn't you define X (or convert it) to a data type that can hold pi. You say you don't want MATLAB to invisibly alter your choice of data, but you do seem to want it to invisibly alter your choice of data type. Why is one better than the other?