semilogy plot using 'arrayfun'

1 次查看(过去 30 天)
Debabrata Ghosh
Debabrata Ghosh 2020-9-13
Hello Everybody,
I have been trying to plot a cell array using 'arrayfun', and it works perfectly when I do a 'plot', but it does not seem to work for 'semilogy'. Please see the examples below. I get the correct plot for (1). But, for (2), it does not give me the semilog plot. Instead, it gives the same plot as (1). So, the plots are exactly the same for both (1) and (2), even though for (2) I use 'semilogy(x{:}......'
  1. arrayfun(@(x) plot(x{:}(:,1),x{:}(:,2),'Parent',S.ax1, 'LineWidth',2.2),S.c);
  2. arrayfun(@(x) semilogy(x{:}(:,1),x{:}(:,2),'Parent',S.ax1, 'LineWidth',2.2),S.c);
S.c is a cell array of size (1,n). 'n(>=1)' is user defined'. In this case n = 4. Basically, I am plotting 4 lines. What am I missng here? Thanks, in advance!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by