drawing density function

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi ,
I have a few series of data for which I want to draw the "density
function".
anybody knows with which procedure can I do this?
If you have an example of a code- it could be great.

Thanks in advance!
0
Reply talila.ar (28) 6/2/2009 4:09:17 PM

See related articles to this posting

comp.soft-sys.sas 131467 articles. 30 followers. Post

0 Replies
145 Views

Similar Articles

[PageSpeed] 0


Reply:

Similar Artilces:

draw probability density function curve
X is a random variable. In the simulation program, I have obtained series of numbers for this variable: 0.1, 0.2312, 0.343, 5.0343..... I hope to draw probability density function based on this discrete number. Any suggestions for this? Thanks in advance. mobiler wrote: > X is a random variable. In the simulation program, I have obtained > series of numbers for this variable: 0.1, 0.2312, 0.343, 5.0343..... > > I hope to draw probability density function based on this discrete > number. A combination of HIST, to get bin counts, and BAR, to plot the _rescaled_ counts (bar ...

How to draw normal probability density function for 3d vector
Hi all, I want to draw normal probability density function for the following data: x = 3 x 10 array mu = 3 x 1 vector sigma = eye(3) Normpdf(x,mu,sigma) gives error as it requires all the arguments of the same size. thanks. "kumar vishwajeet" <kwzeet@gmail.com> wrote in message <i6c9oc$kds$1@fred.mathworks.com>... > Hi all, > I want to draw normal probability density function for the following data: > x = 3 x 10 array > mu = 3 x 1 vector > sigma = eye(3) > > Normpdf(x,mu,sigma) gives error as it requires all the arguments of the same...

GammaLn, Complete Beta function, Probability Density function
Hi! I designed the following functions, partly not available in FSL: - GammaLn - Complete Beta function - Beta Probability Density function AFAIK the GammaLn function is also in the Gamma code of FSL, but this one u= ses a Lanczos approximation. It seems to be a bit slower, but a little more= precise close to zero (about 13 digits of precision). The Beta function an= d PDF function build on that, but they also work fine with the loggamma of = FSL. Excuse the sometimes odd code, but this is a straight port from 4tH. Hans Bezemer ---8<--- create _L 6 floats allot 76...

Calling functions from functions from functions ...
Lets say I have a function g(p,x) where x and p are of some defined type. I also have a function NewtonR which I can use like so: x = NewtonR(g,p,x0) There is also another function I want to call ImplicitTrap which can be done as: u = ImplicitTrap(g,p,u0,step,n) This function defines a function of g, and it is this function that I'd like to pass to NewtonR. Can it be done? Basically the code is implementing the implicit trapezoidal rule for numerical integration with the NR solver being used at each step with automatic differentiation being used to handle the differentiation. M...

When is a function not a function?
I've got a collection of functions that accept a function or object (paired with a method name) as a callback. For the longest time I have relied on this test. (typeof cb == 'function') This should work as well, but I am not sure how well it degrades in older browsers. I think there are issues with functions created in another context (eg frame) as well. (cb instanceof Function) Then I came across this. (!!fn && typeof fn != "string" && !fn.nodeName && fn.constructor != Array && /function/i.test( fn + "" )) I'm sure it...

Function functionality
Hey, I&#8217;m sure this is something that is relatively easy to code for, but I haven&#8217;t been able to do it easily without generating lots of different error messages! Basically, I created an M-file, let&#8217;s say it&#8217;s called Batch_Run, and I want it&#8217;s operation to differ depending on what the user types in the command window. For example, currently, if the user types &#8216;Batch_Run&#8217; in the command window, MatLab processes ALL the files in the current directory using the code in the M-file. However, I would also like it so that if the use...

function of a function
Tried to solve numerically: http://groups.google.com/group/sci.math/browse_frm/thread/248f76d024c1ac57/0bba983777a07bc9#0bba983777a07bc9 thus: EQ= { f'[x] == f[f[x]], f[0]== 1} ; NDSolve[EQ,f,{x,0,2}]; But gives an error. NDSolve::ndnum: Differential equation does not evaluate to a number at x = 0. Also does not work even with other f[0] values. Any way to do that? Hi, it can't work because f[0]==1 give in your differential equation f'[0]==f[1] and NDSolve[] can't find the value for f[1] until it has integrated the equation. The neted dependence...

drawing functions
Ok, for FF 1.5 and Safari I can use Canvas for drawing. For IE 6 I can use excanvas.js. Does that mean I need to use something like Walter Zorn's wz_jsgraphics for other browsers? Andrew Poulos Andrew Poulos wrote: > Ok, for FF 1.5 and Safari I can use Canvas for drawing. For IE 6 I can > use excanvas.js. Does that mean I need to use something like Walter > Zorn's wz_jsgraphics for other browsers? Opera 9 has canvas support too (and SVG support). So whether you need something like Walter Zorn's drawing library depends on the browsers you want to target. -- ...

Function with a function
I have a GUI that calls a separate function (a different m-file) to perform a certain task. Since this task takes several minutes to complete, I would like to place some frames on the GUI to show progress as the second function runs. These frames would change colors upon getting to certain stages of the code. I am able to get the frames to change color but they do so only after the second function is finished running. Obviously this is no good. A sample of my code is as follows: set(findobj('Tag',['frame2']),'BackgroundColor','green'); This code is contained w...

Functions of Functions
Hello, I was wondering if anyone could help me with this. I've gone through the book and help files as best I can, but can't seem to figure out why the following doesn't work: I'm trying to work with functions that take functions as parameters and return other functions. Below is an example... (*clear stuff*) Clear[a, b, c, x] (*Define a functions a*) \!\(a[x_] := \((Sin[x] + x\^3\/2)\)\) (*define a function of functions*) \!\(b[f_] = \((f'' + \(3\ f'\)\/2 + 5 f)\)\) (*apply the functional function to a*) c = b[...

function of a function!!
maybe i hasn't well formulated my question before, so my question is: I have a function f = f(g) where g = g(a,b) is another function, i need, in the function f to use a parameter of the function g (let's say a), is there a way to call the parameter a inside the function f?? thanks In article <ef11409.-1@webx.raydaftYaTP>, rafi <mimosi1@hotmail.com> wrote: > maybe i hasn't well formulated my question before, so my question is: > > I have a function f = f(g) where g = g(a,b) is another function, i > need, in the function f to use a parameter of the func...

Drawing function
Hi all, I've got a very fundamental question about OpenGL! I've been reading 'The Official Guide to Learning OpenGL'. I'm actually putting my OpenGL code into an MFC application but that isn't important. In all OpenGL applications there is going to be a function that is called when the open gl window needs to be redisplayed (i.e. what glut's glutDisplayFunc would point to or in MFC the WM_PAINT handler). Now in all the examples I've seen and from what I've read, in this function people define their 3D object or objects between glBegin() and glEnd(). Imag...

Drawing functions
I wondered: is it always necessary to specify the domain when you draw a function? For example, if I want to draw y=(1-x**2)**(1/2) (the semi-circle), I have to specify the domain, for example [-1,1], and if I specify as domain [2,3], it gives me error. All right, when the domain of a function is easy to calculate it's ok, but when I don't know how to calculate it (because the function is very complicated) is it possible to make Matlab calculate it? Thanks for your help! Hi Mr. Wolf, I am not sure if this is a Matlab question, since ** would be ^ in Matlab. For a function to work in ...

function to function
Hi friends .. Is it possible to set the parameters in a function with a different function..? If yes can you please a sample to erguzel2000@yahoo.com ...

functions function
The 'functions' function has changed in R14. Further it's help text is misleading. Why would this be a good idea? This was a very useful function. Is there alternative efficient way of obtaining the parent file from a function handle? The help is misleading because it suggests that f = functions(@deblank) f = function: 'deblank' type: 'overloaded' file: 'matlabroot\toolbox\matlab\strfun\deblank.m' methods: [1x1 struct] when what you really get is, >> f = functions(@deblank) f =...

draw function
Hello all. xy.m : function [x,y] = xy(t) x = t^2-2*cos(t); y = 1-sin(t); draw.m: function draw(n,s); figure(n); xlabel('X') ylabel('Y') fplot('xy',s) >> draw(1,1) ??? Attempted to access lims(:,1); index out of bounds because numel(lims)=1. Error in ==> fplot at 96 xmin = min(lims(1:2)); xmax = max(lims(1:2)); Error in ==> draw at 6 fplot('xy',s) function draw must draw a graphik with 2 parametrs where n - figure's nuber s - function step "Cetver Cetver" <wwww@www.com> wrote in message <gi808n$ps4$1@fred.mathworks.com&g...

function functions
I am trying to make code for root finding and to do so I must use "function functions". In order to be more familiar with that, I tried to run one of the matlab examples like the following: function y = humps(x) y = 1./((x-.3).^2 + .01) + 1./((x-.9).^2 + .04) - 6; x=0:0.002:1; y=humps(x); plot(x,y) but I encounterd the follwing error: ??? Input argument "x" is undefined. Error in ==> ffff at 2 y = 1./((x-.3).^2 + .01) + 1./((x-.9).^2 + .04) - 6; I appreciate you inform about the problem. "Dariush Abdolah" <dabdolah@hotmail.com> wrote in message...

Using the draw.ss teachpack to make 'draw-a-circle' function appear on the canvas
I'm stuck on this question: Use fun-for-circle to develop draw-a-circle. The function consumes a circle structure and draws the corresponding circle on the screen. Use (start 300 300) to create the canvas before testing the function. Heres the link to the problem: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-9.html#node_sec_6.6 I'm confused on what the question is asking me because 'draw-circle' has that ability by itself. Alt234 <jtjohnson@hentar.com> writes: > I'm stuck on this question: > > Use fun-for-circle to develop draw-a-circle. The funct...

Parameterizing Functions Called by Function Functions
I would like to know whether this "Parameterizing Functions Called by Function Functions" is available in release 14 only. I have Matlab6p5 release 13, but none of the examples found in the following website work on my machine. <http://www.mathworks.com/access/helpdesk/help/techdoc/math/funfun17.html#941087> Thanks. In article <ef1dd9d.-1@webx.raydaftYaTP>, "Beiyan Ou" <beiyanou@uvic.ca> wrote: > I would like to know whether this "Parameterizing Functions Called by > Function Functions" is available in release 14 only. I have Matlab6p...

need to calculate power spectral density based on transfer function and impulse response i have tried this code for creating transfer function and impulse response
need to calculate power spectral density based on transfer function and impulse response i have tried this code for creating transfer function and impulse response clear all, close all; clc realizations=5; N=1; %a.plot 10 realisations of X(t) t=0:0.01*pi:10*pi; T=0.9; Deltat = 0.01*T; h=exp(-(0:Deltat:T))/(1-exp(-T)); figure(1) for j=1:realizations theta=2*pi*rand(N,1); A=exprnd(1,N,1); Xs=A*cos(t+theta); Y=filter(h,[1,0],Xs); plotcolors={'r','b','g','m','k', 'r--','b--','g--','m--','k--'}; pl...

cumulative density function
Dear PEOPLE, I have a question regarding data interpretation using Matlab. I have some data generate from a random process that interests me. The command hist(x,2^5) gives me a histogram , which is more of a quantized pdf or more correctly a probability mass function. I would like to obtain a pure pdf and even more important a pure cumulative density function i.e. the data should be able to tell the reader that if I have two random sources, how much of the two sources is less than 1, less than 2. The cdf gives this idea. So can you please tell me as to what commands could I use to interpret m...

convolution of density functions
I find the probability density function (pdf) of sum of 2 Random variables as the convolution of the induvidual pdfs. However the area under the new pdf is not equal to one. How do I make sure the area is equal to one ? Has it got something to do with normalization ? what about the time shift that occurs during the convolution ? Please clarify. I am looking for a general case, where the pdfs to be convolved can be any valid pdf. Thanks and Regards So just divide your new matrix by the sum of the new matrix pdf2 = pdf2 / sum(pdf2); The independent axis will be longer, as it should be,...

Cauchy Density Function
Dear all, I'm currently generate random number to evolve my neural network using Gaussian Function. Now I would like to try on Cauchy function. Can anyone, who knows about Cauchy Function, send to me the function or any source code for Cauchy Function (sorry, very bad sentence :-( but I hope you all understand what I mean)? Cheers. Regards, Razali Dear Razali You may ask google almost anything in the world, why not about Cauchy > http://www.xycoon.com/cauchy2p_density.htm > http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm Paul Razali wrote: > Dear ...

Probability Density Function
Hello, I have graphed a normal probability density function with a mean of 10 and a standard deviation of 2.5. I named this function f[x] I wanted to know how to use the "FilledPlot" to show the area under the curve for (x<8) and (7.5<x<11). I have the probability for x<8 to be .212 and for 7.5<x<11 to be .497 by calculating the definite integral of the function f[x] for these two probabilities. I have the cacluation of the probabilities included but no idea on how to continue and display each of these in a graph. Thanks, T Harris ...