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