semilogy plot using 'arrayfun'

1 vue (au cours des 30 derniers jours)
Debabrata Ghosh
Debabrata Ghosh le 13 Sep 2020
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!

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by