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.

2 views (last 30 days)
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

Accepted Answer

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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!