Search Results

Search found 4 results on 1 pages for 'marvin2k'.

Page 1/1 | 1 

  • How to get real Integer Overflows in Matlab/Octave

    - by marvin2k
    Hi there. I'm working on a verification-tool for some VHDL-Code in Matlab/Octave. Therefore I need datatypes which generate "real" overflows: intmax('int32') + 1 ans = -2147483648 Lateron, it would be helpfull if i can define the bitwidth of a variable... But that is not so important... When I build a C-like example, where a variable gets increased until it's smaller than zero, it spins forever and ever... test = int32(2^30); while (test > 0) test = test + int32(1); end Another approach i tried was a custom "overflow"-routine which was called everytime after a number is changed. This approach was painfully slow, not practicable and not working in all cases at all...

    Read the article

  • How do I get real integer overflows in MATLAB/Octave?

    - by marvin2k
    I'm working on a verification-tool for some VHDL-Code in MATLAB/Octave. Therefore I need data types which generate "real" overflows: intmax('int32') + 1 ans = -2147483648 Later on, it would be helpful if I can define the bit width of a variable, but that is not so important right now. When I build a C-like example, where a variable gets increased until it's smaller than zero, it spins forever and ever: test = int32(2^30); while (test > 0) test = test + int32(1); end Another approach I tried was a custom "overflow"-routine which was called every time after a number is changed. This approach was painfully slow, not practicable and not working in all cases at all. Any suggestions?

    Read the article

  • make: invoke command for multiple targets of multiple files?

    - by marvin2k
    Hi, I looking to optimize an existing Makefile. It's used to create multiple plots (using Octave) for every logfile in a given directory using an scriptfile for every plot which takes a logfilename as an argument. In the Moment, I use one single rule for every kind of plot available, with a handwritten call to Octave, giving the specific scriptfile/logfile as an argument. It would be nice, if every plot has "his" octave-script as a dependency (plus the logfile, of course), so only one plot is regenerated if his script is changed. Since I don't want to type that much, I wonder how I can simplifiy this by using only one general rule to build "a" plot? To make it clearer: Logfile: "$(LOGNAME).log" Scriptfile: "plot$(PLOTNAME).m" creates "$(LOGNAME)_$(PLOTNAME).png" The first thing I had in mind: %1_%2.png: %1.log $(OCTAVE) --eval "plot$<2('$<1')" But this seems not to be allowed. Could someone give me a hint?

    Read the article

  • Porting C++-code from Windows to Unix: systemcalls colliding with name of functions

    - by marvin2k
    Hi I'm porting some crufty C++ Windows-code to Linux, which uses functions called "open" and "close" inside every class... Very bad style, or? Luckily that wasn't a problem in windows, since their systemcalls are named different. When I try to call the systemcalls open() or close() I'm getting some compiler error about "no matching function for call for class:open()". I can't rename all our functions named "class::open" and "class::close" in the whole code, and I have to use open() and close() since I'm working with serial ports. So my question is: How can I tell the compiler, which open I mean? How can I escape or hide the namespace of a class in C++?

    Read the article

1