MATLAB: Does the FREQRESP function run slower in Control Systems Toolbox 6.2 (R14SP2) than it did in Control Systems Toolbox 6.1 (R14SP1)

Control System Toolboxfreqrespperformanceslowslowerspeed

When using the FREQRESP function, it takes longer for me to receive a result with Control Systems Toolbox 6.2 (R14SP2) than it did with Control Systems Toolbox 6.1 (R14SP1). The difference is most noticeable when I only specify a single frequency.

Best Answer

This behavior is due to the introduction of a more sophisticated balancing algorithm to the FREQRESP function in Control Systems Toolbox 6.2 (R14SP2). While more computationally expensive, this algorithm will prevent sharp loss of accuracy in some cases. The balancing is done only once, which is why the relative difference in performance decreases as the number of frequencies increases.
Also note that FREQRESP is optimized to compute the response for a representative vector of frequencies. When computing the response for a single frequency, the EVALFR function should be used instead. More information on EVALFR can be found by issuing the following command at the MATLAB command prompt:
doc evalfr