Linearize nonlinear state space equation in MATLAB at steady state setpoint

This post shows one way to linearize a nonlinear state equation \dot{x} = f(x,u) at a steady state setpoint (x_0, u_0) in MATLAB. It is assumed that a function ode.m exists in which the state equation is implemented:

Read More

Calculate Levenshtein distance in MATLAB (words or characters) with Wagner–Fischer algorithm

  Read More

Convert dSPACE ControlDesk measurements to MATLAB/Simulink timeseries (updated)

(Old version here)

  • With this updated MATLAB script, multiple dSPACE ControlDesk measurements can be imported with a single execution
  • The result is saved as a tscollection (collection of timeseries) and all signals are saved with their corresponding name
  • Access imported data with Simulink ‘From Workspace’ block and, e.g.,  dsp_tscs{1}.my_signal
  • < Read More

Fix for Latex4CorelDraw with CorelDraw 2017

I was not able to make the official build of Latex4CorelDraw work with CorelDraw 2017 (and Windows 10). The ‘Latex’ Docker window was always empty. The solution was to recompile it with Visual Studio 2017 Community. Read More

Convert dSPACE ControlDesk measurement to MATLAB timeseries that can be used in Simulink

(Updated version here)

  • dSPACE ControlDesk can export measurements to mdf4 files or mat files
  • mat file exports can be converted to timeseries with this MATLAB script
  • The timeseries can then be imported into Simulink with the ‘From Workspace’ blog
  • Multiple signals can be imported at once

Example output:

Read More

Robust sync between Android phone and Linux computer

I already tried quite a few methods to reliably sync data (e.g. backups) between my Android phone and a Linux computer. Most were not good, some were horrible (MTP…). I just tried one that has proven to be the best, by far: installing an SSH server on the phone and then syncing with rsync. I Read More

Django DetailView with pagination for related objects

This is an example of a DetailView of a User that can have a paginated list of Purchases:

In the template file, the pagination needs to done similar to the following example (using django-bootstrap3):

Github gist Read More

Export object_list of a django-filters FilterView to CSV

This is a simple way to allow users to export the data they have just filtered using django-filter as CSV.

Github gist Read More

Running multiple Django projects on one Apache instance with mod_wsgi

I did not yet find a page with a concise but complete description of how to run multiple Django instances/projects on one server with Apache. This method is similar to the one in the Django docs, but the docs version does not run the Django instance in a daemon process, therefore it does not work Read More

Analytical convolution integral (Analytische Faltung) with Matlab and Maple

With \sigma(t) = Heaviside(t) and \delta(t) = Dirac(t)
Function 1 (e.g. input signal/Eingangssignal):
u(t) = \sigma(t-1) - \sigma(t-4)

Function 2 (e.g. impulse response/Stoßantwort):
g(t) = -\frac{1}{RC}\exp(-\frac{t}{RC})\sigma(t) + \delta(t) Read More

1 2