i want to create M-Block for histogram in system generator for 1000 samples.i am loading following code but i am getting syntax error at line 3. please guide me to design a M-Block for histogram
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
function z1 = xlmax(z)
load ('newfile.txt');
a=newfile(:,1);
z=xlmax(a)
figure(1)
%plot(z)
sum(z)
figure(2);
pr=z./1000;
stem(pr)
xlabel('Bin number','FontSize',10,'FontWeight','bold');
ylabel('Probability','FontSize',10,'FontWeight','bold');
end
0 Kommentare
Antworten (2)
Image Analyst
am 19 Sep. 2015
Use the debugger and look at the workspace. After you call load() is there suddenly a variable called newfile that is poofed into the workspace?
0 Kommentare
Walter Roberson
am 2 Jan. 2016
Replace
load ('newfile.txt');
a=newfile(:,1);
with
newfile = load('newfile.txt');
0 Kommentare
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!