Hi,
As you can notice, while running in MATLAB R2024b, the `findobj` function returns only six lines: three with the tag `BodeMagnitudeLine` and three with the tag `BodePhaseLine`. So, to change the ‘LineWidth’ and ‘DisplayName’ of the desired line, you can change the indexing used in ‘hLines’ array as shown below:
bp = bodeplot(H, H1, H2);
hLines = findobj(gcf, Type='line');
set(hLines, LineWidth=2);
set(hLines(1), LineWidth=6, DisplayName='H');
set(hLines(4), LineWidth=6, DisplayName='H');
set(findall(gcf, 'Type', 'axes'), LineWidth=1.5, Box="off", fontsize=12);
Similarly, in the context of `pzmap`, the `gca` function now returns a `PZPlot` chart object instead of an axes object within the plot. Since 'YTick' is not a property of 'PZPlot', the error appears. You can access the axes by indexing the children of 'PZPlot' object as demosntrated below:
set(gca().Children(1), YTick=[], Box="off", LineWidth=1.5, XAxisLocation='origin', YAxisLocation='origin')
Using MATLAB R2024b, the code above will produce the expected plot as shown below:
Please refer to the following MathWorks documentations on the following topics:
- pzmap - https://mathworks.com/help/control/ref/lti.pzmap.html
- bodeplot - https://mathworks.com/help/ident/ref/controllib.chart.bodeplot.html
- PZPlot - https://mathworks.com/help/control/ref/controllib.chart.pzplot.html
Hope this helps!