Skip to main content

All Questions

Tagged with
1 vote
1 answer
6k views

The Simpson's 1-3 (h / 3) method in Matlab

The C code that finds the following integral according to the Simpson's 1-3 (h / 3) method is given below. Fill in the blanks on the code appropriately. I want to solve this question below in Matlab ...
Daniele Zaniolo's user avatar
3 votes
1 answer
751 views

Hypergeometric function

Octave doesn't seem to have a function to compute the generalized hypergeometric function pFq, or its simpler particular case 2F1: >> help hypergeom error: help: the 'hypergeom' function ...
Luis Mendo's user avatar
  • 113k
0 votes
2 answers
517 views

'Less than' comparison with tolerance

I am trying to write some code that computes whether a is less than b with n-bit tolerance, where a and b are double precision variables. For example, 4.000000001 < 4.00000001 would be TRUE, but 4....
Κωστας Ιωαννου's user avatar
0 votes
1 answer
2k views

MATLAB; Lagrange Polynomial, an Interesting Error

In my school homework I was given a problem, that required me to calculate Lagrange polynomial. The data set (x,y) involved x = 0,1,2....20, while y = x - 0.3*rand() + 1; Then we were asked to ...
ponir's user avatar
  • 477
2 votes
4 answers
569 views

Get equidistant intervals on approximated bark scale

Wikipedia says we can approximate Bark scale with the equation: b(f) = 13*atan(0.00076*f)+3.5*atan(power(f/7500,2)) How can I divide frequency spectrum into n intervals of the same length on Bark ...
nuoritoveri's user avatar
  • 2,554
14 votes
4 answers
1k views

Which numerical library to use for porting from Matlab to C++? [closed]

I am currently prototyping some algorithms in Matlab that rely on matrix, DSP, statistics and image analysis functionality. Some examples of what I may need: eigenvectors convolution in 2D and 3D ...
Andy's user avatar
  • 3,879
1 vote
2 answers
775 views

How to obtain the numerical solution of these differential equations with matlab

I have differential equations derived from epidemic spreading. I want to obtain the numerical solutions. Here's the equations, t is a independent variable and ranges from [0,100]. The initial value is ...
SimpleWater's user avatar
1 vote
7 answers
1k views

Looking for ODE integrator/solver with a relaxed attitude to derivative precision

I have a system of (first order) ODEs with fairly expensive to compute derivatives. However, the derivatives can be computed considerably cheaper to within given error bounds, either because the ...
timday's user avatar
  • 24.9k