Why won't cellfun plot a semilog?

조회 수: 13 (최근 30일)
Rachel Barry
Rachel Barry 2021년 3월 7일
댓글: Rachel Barry 2021년 3월 7일
I have a bunch of data samples stored in a cell array that I am trying to plot using cell fun. For some reason it won't let me plot on a semilog scale and I can't find any reason why that is.
This is the code I have written:
FCabs{k} = abs(FControl{k});
X{k} = (Fs/1024)*(0:1024-1);
figure
hold on
cellfun(@semilogy, X, FClog)
hold off
This is the plot that is output.

채택된 답변

Walter Roberson
Walter Roberson 2021년 3월 7일
hold on
One of the properties that is "hold" is YScale.
FCabs{k} = abs(FControl{k});
X{k} = (Fs/1024)*(0:1024-1);
fig = figure;
ax = axes(fig);
hold(ax, 'on')
cellfun(@(x,y) plot(ax, x, y), X, FClog);
hold(ax, 'off')
ax.YScale = 'log';

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by