I want to design xilinx histogram block for MATLAB 7.4.0(R2007) in system generator .I wrote M-Code and simulating but i am geting error at line 2 of following program.Please any one help me to create M-Block for histogram.

1 次查看(过去 30 天)
function pr = srinu(a)
load newfile.txt;
a=newfile(:,1);
z=xlmax1(a);
% figure(1)
%plot(z)
sum(z)
figure(2);
pr=z./1000; %you must divide by number of sample to get probability of each bin
stem(pr)% this might be your histogram according to your code
% xlabel('Bin number','FontSize',10,'FontWeight','bold');
%ylabel('Probability','FontSize',10,'FontWeight','bold');
end

采纳的回答

Walter Roberson
Walter Roberson 2016-1-2
Replace the load with
newfile = load('newfile.txt');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by