For example if I have the following transfer function:

$$H(s) = \frac{1}{\cosh(\sqrt{s/10})}$$

Can I do the bode plot it in matlab or do I need to rationalize it beforehand?

  • $\begingroup$ What have you tried? $\endgroup$
    – MBaz
    Feb 7, 2023 at 23:02
  • $\begingroup$ I was looking into irrational transfer functions , and I could not find any refrence. I have not tried anything since I have no idea where to start $\endgroup$
    – FISqrt
    Feb 7, 2023 at 23:05
  • $\begingroup$ The Bode plot is the magnitude and phase of H(s) as you limit s to be the $j\omega$ axis. So as long as you can compute a magnitude and phase of the function, you can plot it! $\endgroup$ Feb 7, 2023 at 23:59

2 Answers 2


If that's a problem for you, I recommend taking a basic Matlab class first.

%% plot a transfer function
% frequency axis
omega = logspace(-2,2,1000)';
% calculate the trasnfer function
H = 1./cosh(sqrt(1i*omega/10));

% and plot it
grid on;
ylabel('Level in dB');
xlabel('Frequency in Rad/sec');
grid on;
ylabel('Phase in rad');
xlabel('Frequency in Rad/sec');
  • $\begingroup$ Expressing frequencies in Hz and angles in degrees is left as an exercise to the reader. $\endgroup$
    – TimWescott
    Feb 8, 2023 at 15:37
  • $\begingroup$ @TimWescott or incurs an additional charge of $3.99 plus tax and tip. :-) $\endgroup$
    – Hilmar
    Feb 9, 2023 at 8:13

Matlab's bode function is just a wrapper for calculating a system response and then graphing it.

So, just do that by hand.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.