![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/843330/image.png)
Is it possible to make pdf plot from matrix with mean value?
1 次查看(过去 30 天)
显示 更早的评论
回答(3 个)
Yusuf Suer Erdem
2021-12-24
Try these codes below please;
clc;
clear;
close all;
Data=rand(32,247);
data_mean=mean(Data,2);
plot(data_mean);
ax = gca;
exportgraphics(ax,'LinePlot.pdf')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/843330/image.png)
5 个评论
Yusuf Suer Erdem
2021-12-30
could u provide me your P matrix. put it in .mat file and share here please.
Yusuf Suer Erdem
2021-12-30
Let's see. I used these codes below and it did not give me error. But the 'P' matrix ' s values are pretty small. So I can not see them clearly on the graph.
x = double(P(:));
That command takes the P matrix and converts it into all column vector because fitdist() requires that.
clc; clear; close all;
load('P.mat');
x = double(P(:));
pd = fitdist(x,'Normal');
m = mean(pd);
x_pdf = [1:0.1:100];
y = pdf(pd,x_pdf);
figure
histogram(x,'Normalization','pdf')
line(x_pdf,y)
ax = gca;
exportgraphics(ax,'LinePlot.pdf')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parametric Spectral Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!