Strange FFT Behavior in MATLAB

I think we can all agree that FFT { x*(n) } = X*(N-k), or the FFT of th
conj of x(n) is the conj of the reversed version of the FFT of x(n).
But in MATLAB if a= [1+2j 3+4j 5+6j 7+8j] then
fft(conj(a)) = [16+20j -8+0j -4-4j 0-8j]
and
conj(fliplr(fft(a))) = [-8+0j -4-4j 0-8j 16+20j]
Any ideas? Another engineer and I spent most of a day looking at th
model before finding the fundamental problem.
Cheers
/Patrick

This is due to the fact that MATLAB index starts at 1 while when you say
FFT{x*(n)} = X*(N-k),
you are assuming that k = 0,...,N-1.
Note that when you do X(N-k) when k = 0, the first sample is X(N), whic
is the same as X(0). However, if you use fliplr, this is no longer true.
HTH,
>I think we can all agree that FFT { x*(n) } = X*(N-k), or the FFT of the
>conj of x(n) is the conj of the reversed version of the FFT of x(n).
>
>But in MATLAB if a= [1+2j 3+4j 5+6j 7+8j] then
>
>fft(conj(a)) = [16+20j -8+0j -4-4j 0-8j]
>
>and
>
>conj(fliplr(fft(a))) = [-8+0j -4-4j 0-8j 16+20j]
>
>Any ideas? Another engineer and I spent most of a day looking at the
>model before finding the fundamental problem.
>
>
>Cheers
>
>/Patrick
>
>
>
>

Patrick wrote:
> I think we can all agree that FFT { x*(n) } = X*(N-k), or the FFT of the
> conj of x(n) is the conj of the reversed version of the FFT of x(n).
It's not exactly the reversed version. Your formula is correct, you
just have to look at it closer. Consider
X[k] := DFT{ x[n] }
X1[k] := DFT{ x*[n] }
So for k=0 you get
X1[0] = X*[N-0] = X*[N]. However, this index is beyond the limit
(indices go from k=0,1,...N-1), so X*[N] is in fact X*[0] (all indices
are modulo N). If you write it out you get
(X1[0], X1[1], ... , X1[N-1]) = (X*[0], X*[N-1], ...., X*[1]).
Presumably Matlab's 1-based indexing doesn't make this matter any
easier.
> But in MATLAB if a= [1+2j 3+4j 5+6j 7+8j] then
>
> fft(conj(a)) = [16+20j -8+0j -4-4j 0-8j]
>
> and
>
> conj(fliplr(fft(a))) = [-8+0j -4-4j 0-8j 16+20j]
For that a, I get
X = fft(a) = [16+20j -8 -4-4j -8j]
X1 = fft(conj(a)) = [16-20j 8j -4+4j -8 ]
which is just what the formula says.
> Any ideas? Another engineer and I spent most of a day looking at the
> model before finding the fundamental problem.
No wonder. If I were to look all day at a model*, I would never find
any problems!
Regards,
Andor
*Favourite model to look at: Claudia.

Ah ha! X(N-k) isn't a "reversal" of X, it's a circular shift... that wa
a silly mistake, thanks for the quick answers all. If anyone is ever i
Dallas, TX beers are owed.
Cheers.
/ptj
>Patrick wrote:
>> I think we can all agree that FFT { x*(n) } = X*(N-k), or the FFT o
the
>> conj of x(n) is the conj of the reversed version of the FFT of x(n).
>
>It's not exactly the reversed version. Your formula is correct, you
>just have to look at it closer. Consider
>
>X[k] := DFT{ x[n] }
>X1[k] := DFT{ x*[n] }
>
>So for k=0 you get
>
>X1[0] = X*[N-0] = X*[N]. However, this index is beyond the limit
>(indices go from k=0,1,...N-1), so X*[N] is in fact X*[0] (all indices
>are modulo N). If you write it out you get
>
>(X1[0], X1[1], ... , X1[N-1]) = (X*[0], X*[N-1], ...., X*[1]).
>
>Presumably Matlab's 1-based indexing doesn't make this matter any
>easier.
>
>> But in MATLAB if a= [1+2j 3+4j 5+6j 7+8j] then
>>
>> fft(conj(a)) = [16+20j -8+0j -4-4j 0-8j]
>>
>> and
>>
>> conj(fliplr(fft(a))) = [-8+0j -4-4j 0-8j 16+20j]
>
>For that a, I get
>
>X = fft(a) = [16+20j -8 -4-4j -8j]
>X1 = fft(conj(a)) = [16-20j 8j -4+4j -8 ]
>
>which is just what the formula says.
>
>> Any ideas? Another engineer and I spent most of a day looking at the
>> model before finding the fundamental problem.
>
>No wonder. If I were to look all day at a model*, I would never find
>any problems!
>
>Regards,
>Andor
>
>*Favourite model to look at: Claudia.
>
>

On Sep 20, 8:01 am, "patrickjennings" <patrick.t.jenni...@gmail.com>
wrote:
> I think we can all agree that FFT { x*(n) } = X*(N-k),
actually the folks at The Math Works do not agree. as fatnbafan said,
MATLAB is hard-wired or hard-coded so that the indices of all arrays
begin with 1, not 0 as it should for the DFT or FFT.
so in MATLAB, if N=length(x); y = conj(x); X = fft(x); Y = =
fft(y); then
Y(k+1) = conj( X(mod(N-k+1, N)) ); % for 0 <= k < N
or stated so elegantly that it's amazing we all don't just sing the
praises of MATLAB,
Y(k) = conj( X(mod(N-k+2, N) ); % for 1 <= k <= N
gee, isn't that elegant?
r b-j
> or the FFT of the
> conj of x(n) is the conj of the reversed version of the FFT of x(n).
>
> But in MATLAB if a= [1+2j 3+4j 5+6j 7+8j] then
>
> fft(conj(a)) = [16+20j -8+0j -4-4j 0-8j]
>
> and
>
> conj(fliplr(fft(a))) = [-8+0j -4-4j 0-8j 16+20j]
>
> Any ideas? Another engineer and I spent most of a day looking at the
> model before finding the fundamental problem.
>
> Cheers
>
> /Patrick

robert bristow-johnson <rbj@audioimagination.com> wrote in
news:1190307365.158064.56600@d55g2000hsg.googlegroups.com:
> actually the folks at The Math Works do not agree. as fatnbafan said,
> MATLAB is hard-wired or hard-coded so that the indices of all arrays
> begin with 1, not 0 as it should for the DFT or FFT.
It's an index-- just a conceptual place holder, not a definition. X(1),
in a ones indexed language, merely points to the first memory location in
array X.
Most likely the ones indexing in Matlab has its roots in Fortran.
Aside from having to remember what language you're working in and getting
bitten every now and again when moving back and forth between languages,
it really isn't that problematic.
> Y(k) = conj( X(mod(N-k+2, N) ); % for 1 <= k <= N
>
> gee, isn't that elegant?
As compared to what? If you're comparing to finding and downloading the
c implemenation of fftw, compiling it, linking to it, then figuring out
which of the many arcane fftw routines you need to be calling, and then
figuring out what arcane pattern your returned arrays are in, maybe
creating complex variable types from two doubles, and then first doing
your elegant zero-indexed circular shift, its a veritable tango. If
you're talking about doing the same in some zero-indexed matlab clone,
probably not as elegant.
--
Scott
Reverse name to reply

<snip, ML's fft behaviour...
I don't buy all this <expletive> stuff. If you don't like
the wrapper TMW have put around the core FFT/FFTW call,
write your own! Scale/shift the results in your own
preferred way - don't blame TMW for not sharing your own
choice.
Phew, glad that's off my chest. Now all we need is support
for zero-based indexing ;-)

When analyzing (real) time series data, the complex
frequency spectrum is symmetric in the real part and
anti-symmetric in the imaginary part.
Way back in Matlab 3, when memory and performance were at a
premium, I formulated MEX files that used this symmetry to
reduce the data size.
It is possible to arrange a real time series into a complex
series of half the length and post process the fft output to
get the spectrum. Or the other way around - arranging half
the spectrum into a real series. For lengths of a power of
2, Matlab 3 used a fast Cooley Tukey algorithm which was
most efficient going from real to complex.
For even lengths that are not a power of 2, Matlab 3 only
used a complex FFT. In those cases, I took the real series
(either time series or half the spectrum), and arranged it
as a complex series of half the length. Again, I could take
half a frequency spectrum and rearrange it as a real series
then rearrange it again as a complex series of half the length.
It sounds more complicated than it was and it ran several
times faster.

Matlab R2008a strange behaviorHello,
I use Matlab R2008a under Ubuntu linux. When I switch from another
program(for example, emacs or another window of matlab) to the main
command window or the editor window, my keyboard loses response:
matlab still works but doesnt display anything I taped from keyboard.
I need to click my mouse on the menu bar or others places to reactive
it. This strange behavior just drives me mad. Can anyone here help?
My java version:
java-6-sun-1.6.0.06
Thanks!
On Aug 27, 6:54=A0am, ettevy <han.wang1...@gmail.com> wrote:
> Hello,
> I use Matlab R2008a under Ubuntu linux. When I switch...

strange matlab symbolic behavior?I am using Matlab 2006a.
y is a symbolic object, which was obtained by:
z=vpa(zs, 10);
p=vpa(ps, 10);
y=1+p*z';
Here "zs" and "ps" are symbolic objects.
(I have to do vpa on "z" and "p" first, otherwise the whole thing is
extremely slow. Anyway, I only need 10 digits of precision)
Here is one element of "y":
>> y(300)
ans =
..95692000694506875870254246903886
Now here is the ERROR:
>> double(y(300))
ans =
0.00492224111378
>> vpa(y(300))
ans =
..492224111377750000222499982224e-2
What happened?
A 0.9569... value converted into "double" is "0.0049222..."???
If I don't convert "y" into double, I cannot plot it:
>> plot(y)
??? Error using ==> plot
Conversion to double from sym is not possible.
>> plot(vpa(y))
??? Error using ==> plot
Conversion to double from sym is not possible.
---------------------------------------
Is there a way to convert y into floating point but still maintains its
correct value: 0.9569200069450...???
>> y(300)
ans =
..95692000694506875870254246903886
...

Complex FFT in DSP vs MatlabHi, everyone!
I use TMS320c6713 DSP.
I compared result of complex fft library in TI DSP with result of
complex fft in Matlab.
Those waveform in frequency domain are similar, but exactly not
matched.
It means..
Range of result in DSP library is wider than one in Matlab.
Why?
Regards.
jaeper@gmail.com wrote:
> Hi, everyone!
>
> I use TMS320c6713 DSP.
> I compared result of complex fft library in TI DSP with result of
> complex fft in Matlab.
> Those waveform in frequency domain are similar, but exactly not
> matched.
>
> It means..
> Range of result in DSP...

FFT MatlabI have been collecting emg signal and would like to look at the
frequency of the signal. In Matlab I know there is an FFT function
which I have been using, but ran into a problem when using it. The
example given in the help says it is using a 512-point FFT. I tried
using a 512-point FFT and a 2056-point FFT and noticed that they look
very different. Is the only difference that the 512 gives less points
to plot than the 2056?
I noticed when I plotted signal of a specific length (1:1000) then
plotted more of the same signal (1:2000), the frequency spectrum
overlapped completely if I used th...

How to apply fft in matlab and see the waveform of fft of a given signalI need help in matlab code for applying fft and perform fft waveform
of a given signal....who can help me??
Chai wrote:
>
>
> I need help in matlab code for applying fft and perform fft
> waveform
> of a given signal....who can help me??
perhaps
My_Spectrum = fft(My_Signal);
My_Spectrum_Conventional = fftshift(My_Spectrum);
plot(real(My_Spectrum_Conventional),'r');hold on;
plot(imag(My_Spectrum_Conventional),'r');hold off;
maybe
Dave Robinson
Thanks for your kindness.
I still working on my project.more question will be coming if you don
mind helping me.
s...

FFT in MatlabHi,
I created an image in Matlab in the following way: I created 2 vectors
that represent the image coordinates, and gave a value to each
combination of the vectors. For example: a=[-0.4:0.02:0.4], b=a,
image(y,x) is the value of a(y), b(x). Then I performed some
operations that are like Fourier transform. I got new coordinates that
were not equally spaced. So I made a grid, and interpolated the
results I had to that grid. Then I performed ifft. I got an image that
is similar to my original image, but not in the right coordinates. For
example, If in the original I had a point in the upper rig...

strange behavior of ??Hi,
The definition of the m?? operator says that it only matches once
between calls to reset. When I ran the following program I confirmed
this behavior:
#!/usr/bin/perl
$_ = "Bilbo Baggins";
for($i=0;$i<5;$i++) {
$a = ?Bilbo?;
}
That is, $a was set to 1 initially and then '' on every pass through the
loop afterward. However, $a does not seem to be set to 1 at all in this
program:
#!/usr/bin/perl
$_ = "Bilbo Baggins";
for (0..4) {
$a = ?Bilbo?;
}
Initially $a is not defined and then it stays '' on each loop pass. I am
running perl v5.8...

Strange, very strangeExplanation is quiet long, but finally the point is really, really
strange!
I'm writting some client/server application. Communication is done by
simple [socket], but additionaly I use DES and bas64 from tcllib.
DES is used to secure transmitted data, and base64 is to allow transmit
it (data) via simple ascii-translated channel (I just need it).
Now: Server-side daemon listens on some socket and when connection is
estabilished it starts to sending some data (simple text) using:
puts $sock [::base64::encode [::DES::des -mode encode \
-key $password $data]]
Clien-side application receives it and decodes like below:
set data [::DES::des -mode decode -key $password \
[::base64::decode $readData]]
and finally, I get $data variable with same value as at the begining,
in server-side daemon. After all of above, I do:
puts "|$data| == |%|"
if {$data == "%"} {
puts 1
} else {
puts 2
}
Guess what? I see on stdout following lines:
|%| == |%|
2
How about that?
--
Pozdrawiam (Greetings)!
Googie
Dnia Sun, 17 Apr 2005 13:06:42 +0000, Googie skrobie:
[...]
> and finally, I get $data variable with same value as at the begining,
> in server-side daemon. After all of above, I do:
> puts "|$data| == |%|"
> if {$data == "%"} {
> puts 1
> } else {
> puts 2
> }
> Guess what? I see on stdout following lines:
> |%| == |%|
> 2
> How about that?
Try to write $data to a file.
Maybe it conta...

Behaviors in BehaviorsHi group,
I'm facing this problem.
I've got a behavior which makes a kind of toolbar, except the buttons on it.
Within this behavior i build
an element, which contains a different behavior. So far so good. everything
works fine. But when i'm trying to access a method in the second behavior,
i'm getting this error about an object being null. How can i access this
method?
i'm using this kind of construction: toolbar.close.disable();
where toolbar is the id of my first behavior, close is the id of the
behavior inside the first one, and disable is a method in the second one.....

Strange behaviorDoes anyone have clue as to what this means?
OS is 5.0.6 with patches and Merge 5.3.7c
WARNING: Merge: _M_vpg_vpte_invalidate - couldn't find vptep F1B6E400
Fri Oct 29 15:11:13 2004
WARNING: bufcall - Could not allocate STREAMS event
All tcp activity halted and this kept repeating on the console. One merge
and then the screen would roll over with the bufcall message. I could get
the login from the console, but it wouldn't let me in. I had to power cycle
to recover.
TIA
Ron
"Ronald J Marchand" <ron@rojomar.com> wrote in message
news:97083$41863e60$42a6716f$29779@msgid.meganewsservers.com...
> Does anyone have clue as to what this means?
> OS is 5.0.6 with patches and Merge 5.3.7c
>
> WARNING: Merge: _M_vpg_vpte_invalidate - couldn't find vptep F1B6E400
> Fri Oct 29 15:11:13 2004
> WARNING: bufcall - Could not allocate STREAMS event
>
> All tcp activity halted and this kept repeating on the console. One merge
> and then the screen would roll over with the bufcall message. I could get
> the login from the console, but it wouldn't let me in. I had to power
cycle
> to recover.
>
> TIA
> Ron
>
>
Hi Ron,
It looks like you're running out of streams.
If you're running samba, you could have the same problem as I had. I don't
know whether this has been submitted in later versions of samba (or later
versions of SCO)
Hope this link to my previous posts helps.
http://groups.google....

Strange behaviorHi all,
I was still fighting for monthes with unpredicable error in my app
compiled in vo27b.
For example: access violation when leaving the app. This error was
coming after the self:exec() of the start function (and after the
queryclose of the standardshell) or HyperLabel:Axit that is not found.
Today, I have imported the Manifest module. Just to try. I don't have
the errors anymore... but... all my menu and look is changed... due to
the windows xp style...
It's a dilema: update all my menu and button.. or deal with the error !
Any suggestion ?
Jean-Luc
Th...

FFT with DSPHello,
How long will it take to finish one 128 Pt FFT with 16bits data using
the low-end DSP?
Thanks in advance,
Mike
Mike wrote:
> Hello,
>
> How long will it take to finish one 128 Pt FFT with 16bits data using
> the low-end DSP?
>
> Thanks in advance,
>
> Mike
>
Which low-end DSP? FFT performance is one of the things that
manufacturer's brag about; I'd look at web pages to see what _they_ say.
--
-------------------------------------------
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Mike wrote:
> Hello,
>
> How long will it take to finish one 128 Pt FFT with 16bits data using
> the low-end DSP?
Somewhere between a bit and a while.
Bob
--
"Things should be described as simply as possible, but no
simpler."
A. Einstein
On Tue, 24 May 2005 08:14:42 -0700, Mike wrote:
> How long will it take to finish one 128 Pt FFT with 16bits data using
> the low-end DSP?
A straight radix-2 Cooley-Tukey FFT on 128 points (complex) requires seven
passes of 64 "butterfly" operations[*]. I've seen DSPs that can execute
the butterfly inner loop in anywhere from four to fourteen cycles, and no
doubt there are processors that take longer than that. That's assuming
that all of the data and coefficients are efficiently arrayed in some sort
of on-chip memory. If either of these are off-chip, then the extra
overhead is anyone...

strange behaviorHi,
I ran into a strage behavior of mutt that really bugged me until I
found an easy workaround.
1) type 'c' to change to a mailbox
2) type '=mailbox_X' type something
3) type tab to change to view a list of matching mailboxes
4) type 'q' - mutt returns to show 'Open mailbox: =mailbox_X'
5) type a character, e.g. 'x' - mutt deletes '=mailbox_X' and shows 'x'
If you instead
5a) move the cursor
5b) type a character, e.g. 'x' - then mutt inserts 'x' into
'=mailbox_X'
I don't like mutt to delete...

Strange, strange...Hi All,
I posted this already today and I am really getting bananas with this issue:
Using Visual Basic 6.0, I am sending SMS. These SMS can be added to an
Access 2000 table by users on the network.
Everything works well when executing the code step by step (F8).
I can trace this in the Access table, that reacts exactly according to what
I was expecting.
But, but....
When running the code, it looks like the records in Access are not updated
quickly enough and, therefore, the SMS are sent more than once (up to 10
times for some).
Here is how I open the table in the Access MDB:
Dim Db2 As Database, Rs2 As Recordset
Set Db2 = Workspaces(0).OpenDatabase(Text10) ' Text10 contains the path
to the Access MDB
Set Rs2 = Db2.OpenRecordset("pendingsms")
Set Data2.Recordset = Rs2
Data2.Recordset.Index = "ID"
It opens correctly and I can view SMS added by net users, using a DbGrid
linked to Data2.
When I stop the timer3 procedure, I can see, in that same DbGrid, the
records marked as sent, after a few seconds.
I have a timer3 on the form, to scan the pending SMS and send them. Mainly,
I browse the Access table and for each record where the field "sent" is
FALSE, I sned the SMS and, if receiving an OK from the modem, I change the
"sent" field to TRUE.
ID tonum texte Sent
24904 +27824170857 test open/close/open Yes
Here is the code associated to Timer3
Private Sub Timer3_Timer()
Timer3.Interval = 0
Dim erlop As Integer, nbrecs ...

Strange behaviorWhy if, f.e., if I write in the page:
var r = (document.referrer).toLowerCase();
var p = r.split("middle")[1];
document.write("-->"+p);
it works
but if I put this script in an external script and insert into multiple
pages with
<script src="my.js"></script>
it doesn't?
Help appreciated.
Regards.
--
Fabri
("Sono pi� di 30 punti...ma � come se fossere 8 o 9....")
The code is fine, so long there's a document.referrer you can grab off
the window.history stack, document.referrer returns the previous url in
the history o...

Strange behavior...Hello,
I have a report which is based on a query...in the query there are the
following fields: 'StartDate', 'EndDate', 'CurrencyPeriod', ...
in the report I have a header (dateHeader) which contains 3 textboxes:
the first two are bound to 'StartDate' / 'EndDate' but the third
textbox is unbound.
The problem is now that I have absolutely no access to the field
Me![CurrencyPeriod] in the dateHeader_Format-Event, I always get
"Microsoft Access can't find the field 'CurrencyPeriod' referred to in
your expression" (Runtime-Error 2465). But I can access all the other
fields of the query! And when I open the query it shows me the field
'CurrencyPeriod' correctly...
Strange, isn't it? Do you have an idea why this happens?
ps: Sorry for my bad english, I'm from Germany
"Steven Weiss" <steven.weiss@bsmht.nhs.uk> wrote in message
news:e3947609.0402030340.1345dd02@posting.google.com...
> Hello,
> I have a report which is based on a query...in the query there are the
> following fields: 'StartDate', 'EndDate', 'CurrencyPeriod', ...
> in the report I have a header (dateHeader) which contains 3 textboxes:
> the first two are bound to 'StartDate' / 'EndDate' but the third
> textbox is unbound.
>
> The problem is now that I have absolutely no access to the field
> Me![CurrencyPeriod] in the dateHeader_Format-Event, I always get
...

Strange behaviorI have one 2k access db with one table in it.
Pc is w2k pro.
When I try to update a field (whichever) through Access via Data-view
(not SQL view) Access itself converts values from 'UD' to 'DU'.
This happens ONLY on this client and ONLY for this type of value (UD)
What is it?
Any help much appreciated.
Regards.
--
Fabri
(Incredibile come si tenda a credere di piu` a Rossi. (cit.))
"Fabri" <no@sp.am> wrote in message news:310sdrF34j744U1@uni-berlin.de...
> I have one 2k access db with one table in it.
>
> Pc is w2k pro.
>
>
> When I try to update a field (whichever) through Access via Data-view
> (not SQL view) Access itself converts values from 'UD' to 'DU'.
>
> This happens ONLY on this client and ONLY for this type of value (UD)
>
> What is it?
Office Auto-Correct settings I would guess.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
...

Strange behavior in run-time vs. dbx behavior when using shmgetHi,
I have a very strange problem, and i don't know what is the reason for
it.
I'm using an AIX 5.1 over power_604.
In my hi-level program (written in c), I'm writing some machine
commands to 0x60000000 segment using shmget and shmat, and after it,
in the assembly code, I'm adding only 2 commands which are;
mtlr xxx //where xxx holds 0x60000000
brl
The purpose of this code is to branch to segment 0x60000000, executing
some machine commands, and from there returning to the branching
procedure.
If i run this application using dbx, it works fine.
I run time, however, after executing the brl command which is
mentioned above, i have a run time error regarding an illegal op-code,
i.e., in the address 0x60000000 there are other bytes rather the
machine commands i wrote to this address!!!
In my program i'm using shmctl and shmdt.
I don't know what the hell is going on!
I have some ideas:
1. maybe other process is using this 0x60000000 segment.
2. maybe the core in making some optimizations.
3. maybe i don't use shmget right.
4. maybe some kind of special compilation is needed.
I will be very happy to get some help in this
Thanks
Israel
israelaix@hotmail.com (Israel Waldman) writes:
> I have some ideas:
> 1. maybe other process is using this 0x60000000 segment.
....
5. Maybe you are not following the procedure one must follow when
writing self-modifying code, e.g. flushing D-cache to memory.
Search for "Self-modifying code" here...

Strange behavior in run-time vs. dbx behavior when using shmgetHi Paul,
Thanks for your answer to my problem "Subject: Strange behavior in
run-time vs. dbx behavior when using shmget".
I don't understand how your hint will help me.
Maybe i was misunderstood. I'm writing to the 0x60000000 segment only
once in the beginning of my application, so the code there isn't
supposed to be changed, and in this segment there are no calls to
other procedures in this segment. So only a code from segment
0x10000000 will branch to this segment.
Maybe you mean that before writing to this segment i should flush the
buffer?
Thanks
Israel
israelaix@hotmail.com (Israel Waldman) writes:
> Hi Paul,
If you wanted to ask me personally, it is probably would have been
better to just send a private e-mail. However, having decided to
use the usenet, you should have really continued the thread you
have already started, not start a new one. [You do know there is
a difference, don't you?]
> Maybe you mean that before writing to this segment i should flush the
> buffer?
What I meant is that this sequence doesn't work on PowerPC:
void *ip = ... // (1) some operation that returns a pointer to
// writable and executable page, e.g. 0x60000000
// (2) code to construct executable instructions at address ip
// (3) [missing steps]
void (*func)(void) = (void (*)())ip;
(*ip)(); // call the dynamically-generated code @ 0x600...
The missing steps in (3) are flushing D-cache and invalidating I-cache.
You ma...

Why strange IF...ELSE behaviorHi all,
I'm getting a strange result with the following IF statement:
$bar = ($foo == 'last') ? true : false;
In my script $foo normaly has a integer value greater than 0, but can have
last as value. But whatever value of $foo $bar always becomes true.
When I use the regular if {....}else{....} I get the same result, always
$bar becomes true.
I've played around with a couple things, like turning the statement around
($foo != 'last') but nothing seems to give the desired result.
Can anyone tell me what I'm doing wrong or how to fix this.
Thanx,
J-P
J-P �crivit:
> Hi all,
>
> I'm getting a strange result with the following IF statement:
>
> $bar = ($foo == 'last') ? true : false;
>
> In my script $foo normaly has a integer value greater than 0, but can
> have last as value. But whatever value of $foo $bar always becomes
> true.
It's due to the silent type casting of php
you should use === instead of ==
--
P'tit Marcel
>
> It's due to the silent type casting of php
> you should use === instead of ==
>
Thanx that did it, never to late to learn something.
...

Strange findfirst behaviorI have a combo box that finds a record on the form, and for the most
part it works fine. But, on occasion it brings me to the record just
before the one I am looking for. If I compact and repair the database
it works correctly again. Sometimes I have to compact and repair
twice.
Any help would be appreciated
It sounds as if something is corrupting the index on the field you are doing
the search on. Please see this link for information on avoiding corruption.
http://www.allenbrowne.com/ser-25.html
--
Wayne Morgan
MS Access MVP
"Shyguy" <shyguy@aol.com> wrote in message
news:j88cq1lf21ndsq90b49t5e1oqlll08ovr0@4ax.com...
>I have a combo box that finds a record on the form, and for the most
> part it works fine. But, on occasion it brings me to the record just
> before the one I am looking for. If I compact and repair the database
> it works correctly again. Sometimes I have to compact and repair
> twice.
>
> Any help would be appreciated
>
Thanks for the link. I'll have to go through it later. ;-)
On Mon, 19 Dec 2005 04:45:03 GMT, "Wayne Morgan"
<comprev_gothroughthenewsgroup@hotmail.com> wrote:
>It sounds as if something is corrupting the index on the field you are doing
>the search on. Please see this link for information on avoiding corruption.
>
>http://www.allenbrowne.com/ser-25.html
...