histfit, Reusing matlab auto generated code.
이전 댓글 표시
Hi,
I am trying to get histfit plot for a vector. First i am using MATLAB plot tool to get required pot. But i want to use this in a loop so thats why i have generated m-code from ==> File ==> Generate M-File.
Problem is I don't get how to use it. Here is a short example:
v = [1:20];
histfit(v);
Here I get a plot, then go to File and generate M-file. After that i got following code:
function createfigure1(xvector1, yvector1, X1, Y1)
%CREATEFIGURE1(XVECTOR1,YVECTOR1,X1,Y1)
% XVECTOR1: bar xvector
% YVECTOR1: bar yvector
% X1: vector of x data
% Y1: vector of y data
% Auto-generated by MATLAB on 15-Mar-2011 14:36:01
% Create figure
figure1 = figure;
% Create axes
axes1 = axes('Parent',figure1);
box(axes1,'on');
hold(axes1,'all');
% Create bar
bar(xvector1,yvector1,'BarWidth',1);
% Create plot
plot(X1,Y1,'LineWidth',2,'Color',[1 0 0]);
Now the problem is if i wanna use this function then i have to give 4 input arguments and I need your help in that. Because in first step i was using just histft(v). So how to get these 4 input arguments from v.
Thanks in advance.
\\Arsalan
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!