Hi to everybody
I finally found a solution to make plots much faster.
First I try to use all four cores of my computer (Parallelize) and I try to not increase the numb rod points above a reasonable number (could there be a bug in the LogPlot commands of Mathematica?). I found out that Mathematica tries to count with step one when constructing a table although I wanted later on to represent it on a Log scale (this makes sense to me, as Mathematica does not know what I am going to do with the table). But this was very, very slow. Could this be bug in the LogPlot functions and that's why it is solo slow?
Any how, here is my proposal which fastens the BodePlot representation really a lot.
ListLogLinearPlot[
Parallelize[
Table[{10^i,Part[20 Log10[Abs[function[2. PiN I 10^i]]], 1]}, {i, 2, 5,0.01}]],
PlotLegends -> {"function"}, Joined -> True, GridLines -> Automatic, GridLinesStyle -> Directive[GrayLevel[0.8]], Frame -> True]
ListLogLinearPlot[
Parallelize[
Table[{10^i, Part[DegN Arg[function[2. PiN I 10^i]], 1]}, {i, 2, 5, 0.01}]],
PlotLegends -> {"function"}, PlotRange -> {Automatic, {-180, 180}}, Joined -> True, GridLines -> Automatic, GridLinesStyle -> Directive[GrayLevel[0.8]], Frame -> True]
The number of points can be increased with the step when constructing the table (here 0.01)
One ListPlot is for the magnitude and the other for the phase (the phase was even worse to plot with the normal LogLinearPlot.
Good luck and thank you to all for your help.
Stefan