How to increase SPEED of solving linear system

1 view (last 30 days)
I am making a gui with a dynamic plot linked to sliders and edit text boxes. So, i want to the plot to update AS FAST AS POSSIBLE.
i have written a function that uses RK4 method to numerically solve any linear forced/unforced system, but it is too slow! takes about 2-5 (sometimes more) seconds to update!
theres two other options i have:
1) numerically evaluate 3 different convolution integrals for umdamped, overdamped, critically damped cases rather than solving a system of differential equations.
2) somehow take advantage of Fourier Transform, and doing computations in the frequency domain then inverse Fourier Transform back to time domain.
I believe option 2 will be fastest.. but what kind of built in functions does matlab have for Fourier Transform?
and what is FFT (fast fourier transform, ive seen that term thrown around here before)

Answers (1)

Star Strider
Star Strider on 29 Mar 2015
For the fft, consider the Signal Processing Toolbox dftmtx function. I have no recent experience with it, but it may reduce the fft and inverse operations to a matrix multiplication and division.
If your system is linear, another option (and my preference in my own applications) is the expm function.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!