Questions tagged [integral]

This tag should be used for questions related to coding solutions for integrals.

In numerical analysis field, algorithms for integration are a typical example of use for this tag. See also:

819 questions
0
votes
1 answer

Ignore negative values matlab integral

Essentially what I'd like to do is fun=@(x,y) x.*y integral2(fun,-5,5,-5,5) However, I want to ignore portions of my integration range where x*y is negative. Basically, adjust my bounds of integration such that x*y is guaranteed to be greater…
user1707675
  • 21
  • 1
  • 2
  • 9
0
votes
1 answer

Trouble with sort array nodejs java bubble, mongodb

My Dave array in mongo bubble doesn't seem to want to function properly. When declaring the array it doesn't want to split to an integral value. If anyone has any code for that, it would be hugely appreciated.
brent
  • 984
  • 1
  • 9
  • 12
0
votes
1 answer

How to integrate matrices (Sum of Matrices with dx spacing) in MATLAB?

I'm pretty confused on how I would go about summing an infinite amount of matrices in MATLAB. Lets say I have this function (a gaussian): %Set up grid/coordinate system Ngrid=400; w=Ngrid; h=Ngrid; %Create Gaussian Distribution G = zeros ([w,…
user1886681
  • 177
  • 2
  • 7
0
votes
1 answer

How to come up with a math equation from a known set of values

I have a table like this: IQ Score Percentile 58.75 | 0 | 0 70 | 15 | 2 85 | 35 | 16 100 | 55 | 50 115 | 75 | 84 130 | 95 | 90 Im trying to find an equation that I can use to dynamically…
matt
  • 2,312
  • 5
  • 34
  • 57
0
votes
1 answer

How numerically solve an complex integral using the MATLAB

I'm trying to solve this equation: K=sqrt((R*T)/(4*pi*lambda))*integral from -inf to inf of exp(-((lambda+F*neta)/R*T-x)^2*R*T/4*lambda)/exp(x)+1 with regard to x where, neta is an interval from 0 to 1 and the others symbols (R, T, F, lambda and pi)…
0
votes
1 answer

Parameter passing to function handle

I have a function and I want to each time change its input and integrate over a certain interval. For example, I first write an m file: function y = myfun(x) y = 1 ./ (x.^3 - 2*x - 5); Now I want to integrate functions like myfun(x-2) or…
user2225868
  • 33
  • 2
  • 7
0
votes
1 answer

Using MATLAB, how can I find the integral of a bounded CDF?

Using MATLAB, I am trying to find the integral of a bounded range of a CDF. Please refer to the following code: u = 1; s = 1; X = random('Normal',u,s,1,10000); pd = makedist('Normal','mu',u,'sigma',s); xAxis = min(X):.0001:max(X); c_pd =…
0
votes
1 answer

Why do these errors appear? quad2d, dblquad

I have a huge function to integrate: syms x y f=(228155022448185.*(cos((2.*pi).*y)./exp(131738205584307./(35184372088832*x)) - 1)*(cos((8.*pi).*y)/exp(131738205584307./(8796093022208*x)) -…
frwmetric
  • 41
  • 1
  • 1
  • 6
0
votes
1 answer

quad for multivariable functions

I have a function f(x, y, z, t) which has 4 different variables, and I want to find the numerical integration of it with quad in case of just one variable: quad(f(x,y,z,t), x, 0, inf) %// numerical integration in case of x Is it possible? I assume…
frwmetric
  • 41
  • 1
  • 1
  • 6
0
votes
1 answer

Plot Integral with variable limits in Matlab

I'm having some trouble trying to solve and plot an integral in matlab. In fact, I know that if a solve one, I'll solve all the integrals that I need now. I have plot in x axis a value of a variable "d" and in y axis the value of a integral of a…
PauloI
  • 1
  • 2
0
votes
1 answer

nested trapz double integration

I'd like knowing if there is any way to bypass the call for quad2d with a nested trapz loop. I'll discuss my problem with some more detail: currently, I perform the calculation of a double integral this way: clc, clear all, close all load…
fpe
  • 2,700
  • 2
  • 23
  • 47
0
votes
1 answer

How do I integrate a multivariable function?

I have a function f(x_1, x_2, ..., x_n) where n >= 1 that I would like to integrate. What algorithm should I use to provide a decently stable / accurate solution? I would like to program it in Python so any open source examples are more than…
sdasdadas
  • 23,917
  • 20
  • 63
  • 148
0
votes
1 answer

Riemann Integrator Sum Issue

Here is my code for the Riemann Integrator: public class RiemannIntegrator { public static void main (String [] args) { double lower = Double.parseDouble(args[args.length -2]); double higher =…
user2162213
0
votes
2 answers

How can I define an operator (eg integrator) in Python operating on a multi-variable function?

How can I define an operator (eg integrator) in Python operating on a multi-variable function? My problem is that when I define an integrator function numint to numerically integrate a multivariable function along one of its variables that variable…
owari
  • 369
  • 3
  • 14
0
votes
1 answer

Assertion failed

why do i keep receiving this error when i use cvIntegral() if ((image = cvLoadImage(filename,1))==0){ return -1;//if there is something wrong exit with -1 } image2 =…
938752641
  • 3
  • 1