Why won't cellfun plot a semilog?
12 views (last 30 days)
Show older comments
Rachel Barry
on 7 Mar 2021
Commented: Rachel Barry
on 7 Mar 2021
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.

0 Comments
Accepted Answer
Walter Roberson
on 7 Mar 2021
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';
More Answers (0)
See Also
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!