Sinc Function and Gauss-Legendre quadrature

How these two could possibly relate to each other? I had no idea, until I saw these two plots today:
Green curve is a frequency response of Gauss-Legendre quadrature of order N=15, red – N=25 and blue curve is the \mathrm{sinc}(\omega) function.
Read More »

Posted in Filter Design, Numeric Analysis, Numerical Integration | Leave a comment

Open Newton-Cotes Formulae Revised

Few years ago I have published some ideas on how to improve numerical stability of the Newton-Cotes formulas of closed type. Today I want to apply the same ideas to so-called “open” NC-formulas when boundary points are not used for integral approximation.

Just to remind the basic facts and ideas. Newton-Cotes rules use polynomial interpolation to approximate the function under integral sign. Then integral of the function is assumed to be equal to the integral of the approximating polynomial (which can be computed explicitly).

Idea is simple enough, but it has one serious drawback.
Read More »

Posted in Numeric Analysis, Numerical Integration | Tagged , | Leave a comment

MPFR C++ Debugger Visualizer in Visual Studio

Built-in debugger in Visual Studio has very nice extension capabilities. One particularly useful feature – developer can create custom visualizers for his own complex data types. Usually interactive debugger just shows data members of user-defined (and unknown to him) classes and structures, e.g.:

Obviously this is not very handy. In example above mpreal is arbitrary precision floating-point numeric type. It is only natural to show variables of the type as numbers, not as collection of low-level data pointers and properties.
Read More »

Posted in MPFR, Programming | 6 Comments

Chemistry in WordPress using QuickLaTeX

New version of QuickLaTeX is out – 3.7.7. Besides improvements in general functionality it includes special features for chemistry-oriented web sites:

  • Support of myChemistry environment \begin{rxn} ...\end{rxn} directly in the text (do not forget to include myChemistry into global/local preamble). Check examples on myChemistry home page.
  • Correct support of ChemFig package, no tikzpicture wrapping required anymore. However you have to use [latex] ... [/latex] tags to mark ChemFig code sections. We didn’t implement support ChemFig commands directly in the text since one picture can be generated using long sequence of commands, there is no way for QuickLaTeX to know where diagram starts/ends. Read More »
Posted in QuickLaTeX | Leave a comment

QuickLaTeX: Hackenbush diagram

Today I stumbled across Tikz Diagrams in Math Mode topic on tex.SE. Here is how QuickLaTeX solves the task (example is taken from one of the answers in the thread):

Rendered by

Read More »

Posted in QuickLaTeX | Tagged , , | Leave a comment

QuickLaTeX: tikZ-timing package

LaTeX package tikZ-timing created by Martin Scharrer allows easy typing of timing diagrams (digital waveforms) in offline documents.

With the aid of QuickLaTeX tikZ-timing diagrams can be used seamlessly in the WordPress blogs (or any other website). You can just paste tikZ-timing commands directly in the text – QuickLaTeX will compile them into images and embed in the published page.

Read More »

Posted in QuickLaTeX | Tagged , , | 2 Comments

QuickLaTeX: Laplace Transformation Symbols

There are special commands for Laplace-Transformation Symbols in trfsigns package (see The Comprehensive \textrm{\LaTeX} Symbol List, Table 81, page 40): \laplace and \Laplace .

To use them with QuickLaTeX, just include trfsigns in preamble (local or global), e.g:

  f(t) \laplace F(s) \qquad F(s) \Laplace f(t)

results in

    \[   f(t) \laplace F(s) \qquad F(s) \Laplace f(t) \]

Can you do that with other LaTeX plugins for WordPress :-)?

Posted in QuickLaTeX | Tagged , | 1 Comment

QuickLaTeX: tikZ graphics

QuickLaTeX is free online service which allows LaTeX usage on the web pages.

QuickLaTeX supports tikZ graphics since version 3.7.1.

User can insert tikZ code snippets directly on the page (in WordPress editor) between \begin{tikzpicture} ... \end{tikzpicture} commands. QuickLaTeX will render it into image and place on the page.

Read More »

Posted in QuickLaTeX | Tagged , , | Leave a comment

How To: QextSerialPort for Visual Studio 2010

QextSerialPort is a nice library for serial port communication. It is based on C++ cross-platform Qt framework and must have in the toolkit of DSP/embedded software developer.

I’ve spent several hours trying to compile QextSerialPort for Visual Studio 2010 + Qt 4.7.1. Here is my recipe to success.

We assume that Qt is installed in C:\Qt\4.7.1 (see How To Compile Qt 4.7 with Visual Studio 2010 for instructions).

Read More »

Posted in Programming | Tagged , , | 12 Comments

How To Compile Qt with Visual Studio

This post is a step-by-step guide on how to compile Qt 4.x.x with MSVC 2010.

Although we use Qt 4.7.1 as an example (for historical reasons), you can also find suggestions on building newer versions of Qt by MSVC 2012 and even by Intel Compiler for both platforms x86 and x64. All kudos go to numerous contributors, who spend their time to do all the tweaking and testing (see updates below).

In particular there are instructions on how to build Qt 5 for x64 platform contributed by Vincenzo Mercuri.

Read More »

Posted in Programming | Tagged , , | 202 Comments