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! ...

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 ...

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...

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...

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...

Hey, I’m sure this is something that is relatively easy to code for, but I haven’t been able to do it easily without generating lots of different error messages! Basically, I created an M-file, let’s say it’s called Batch_Run, and I want it’s operation to differ depending on what the user types in the command window. For example, currently, if the user types ‘Batch_Run’ 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...

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...

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...

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...

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...

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 ...

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...

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...

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. -- ...

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...

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 ...

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[...

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 =...

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...

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 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...

I have already generated a set of random numbers following normal distribution pattern by command NORMRND. How to plot the probability density function curve from these random numbers? one way is to use hist command "Wat" <q123454321hk@yahoo.com> wrote in message news:ef13412.-1@webx.raydaftYaTP... >I have already generated a set of random numbers following normal > distribution pattern by command NORMRND. How to plot the probability > density function curve from these random numbers? ...

Hello group, By means of stochastic toolbox, is it possible to calculate the Gaussian likelihood for a vector, given the mean vector and the covariance matrix? Function 'normpdf' seems to work on scalars only. regards, -- Gutek Gutek wrote: > Hello group, > > By means of stochastic toolbox, is it possible to calculate the > Gaussian likelihood for a vector, given the mean vector and the > covariance matrix? Function 'normpdf' seems to work on scalars only. > > regards, Is MVNPDF, from the Statistics Toolbox 4.0 (R13) and later, what you wa...

I've to draw following surface: f(n,p)=p!\{n choose p} I guess that i have to draw this function for not negative integers values of p and n. Well, n takes values in [512,1024], while p in [2,12]. Any suggestions??? I try to draw this function generating a set data with a simple self made python program, but when i draw this set of data there is a problem with the axes that represents f(n,p) cause the values are spanned from 1e-6 to 1e-19 and I can see just a flat surface. Do you think that is possible to draw this surface using the integral in two variables, actually I ca...

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 ...