Why won't cellfun plot a semilog?

12 次查看(过去 30 天)
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