Réponse apportée
error using unique function
What type of data is in the cell array? When you use UNIQUE on a cell array, the only case that's supported is when the element...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Can I use hexa address like '0xF2' value in Matlab?
Don't know anything about the second question. As to the first, because MATLAB does not have a hex format in the language, you ...

plus de 13 ans il y a | 0

Réponse apportée
Compare inv(X) Vs mex inv (X)
I think it's rather likely with a difference of that magnitude that you have left memory integrity checks on. Try >> cfg =...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
quadl with vector bounds
One option is to use ARRAYFUN >> arrayfun(@(b)integral(@(x)x.*sin(x),0,b,'abstol',1e-5,'reltol',1e-5),0:3) ans = ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How to make a FOR loop to be efficient
There is no way to do what you ask, and it would not help you much if there were. What is it that that you're really trying to ...

plus de 13 ans il y a | 0

Réponse apportée
Numerical integration
If I understand the question properly, given a function f(x,y) and integration limits a <= x <= b, g = @(y)integral(@(x)f(x...

plus de 13 ans il y a | 0

Réponse apportée
integrate function
The problem has nothing to do with the integrator, rather with the way you have written the integrand: >> a = 1; b = 1; ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Using integral function for a function which is defined with an integral
>> phi = @(r)arrayfun(@(x)integral(@(t)exp(-t.^2./2),-inf,x),r); >> phi(-3:3) ans = Columns 1 through 5 0.003...

plus de 13 ans il y a | 0

Réponse apportée
quad2d precision?
I don't know what "60-100%" accurate means. Perhaps it would help to give a few examples of results that you regard "inaccurat...

plus de 13 ans il y a | 0

Réponse apportée
integration
I never quite know what to say when questions like this come up. There's nothing wrong with wanting to do integrals analyticall...

plus de 13 ans il y a | 2

Réponse apportée
Integration using a vector as function parameter
Not sure of your intention. This is how I interpreted what you wrote: >> N = 1:4; >> Crush = @(x,n) x.^n; >> integra...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
matlab embedded fuction in simulink
I don't know anything about XSteam, but whenever you use an extrinsic function call, you need to pre-declare the output so that ...

presque 14 ans il y a | 3

Réponse apportée
numerical integration
You can't just integrate over the singularity near x=0.66. That's why you're getting the wrong answer.

presque 14 ans il y a | 0

Réponse apportée
Problem using the defined function triplequad
TRIPLEQUAD requires constant limits. You cannot have bounds that depend on integration variables. If you have R2012a, try INTE...

presque 14 ans il y a | 0

Réponse apportée
surface integral computation.
You should never expect an exact result from a numerical integrator. Even when there is no discretization error, there can be s...

presque 14 ans il y a | 1

Réponse apportée
problem with integrand and quad2d
Look at the definition of Vs. If you raise a negative quantity to a non-integer power, you get a complex number. The integrand...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Using quadgk inside a loop
You've got a couple of problems here that jump out at me. One is that your expression for n0 tends to lose precision due to the...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Using quadgk inside a loop
I agree with Richard. We'll probably need to see one of your attempts, but I can take a guess. Most likely you're having troub...

presque 14 ans il y a | 0

Réponse apportée
Integration of a function from R^1 to R^n
The integral of a vector-valued function is vector-valued. You simply integrate each component. This can be done with QUADV or...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Matlab Coder : codegen for mvnrnd
Instead of using sigma in that -args list, use sigma_type = coder.typeof(0,[2,2],[true,true]) This means the type is doubl...

presque 14 ans il y a | 0

Réponse apportée
integration using quadgk() in the complex plane
I'm going to assume this is a homework problem. Complex integrals generally depend on the path chosen. Here you want to go fro...

presque 14 ans il y a | 0

Réponse apportée
problem with double integral, dblquad and quad2d
syms ne me epsilon eta zeta; K1=76*10^9; K2=150*10^9; G1=26*10^9; G2=78*10^9; Vs=(((zeta/2)+(1/2))^ne)*((eta/2)^me); ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
in simulink, how to call functions (such as "quadv") which need to call function handles
First, regarding QUADV in particular, the MATLAB Function Block supports QUADGK. You may find that it is competetive to call QU...

presque 14 ans il y a | 2

| A accepté

Réponse apportée
Integration of some function containing a singularity
QUADGK has no trouble when t=1, but for t=2,3,4,... the correct answer, if I am not mistaken, is Inf. You were expecting QUADGK...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Double integration
If you have the 2012a release, just use INTEGRAL2: >> a = 2; b = 3; m = 2; n = 3; c = 2; d = 3; >> f = @(x,y)exp(-a*x-b*...

presque 14 ans il y a | 2

| A accepté

Réponse apportée
weird Problem with dblquad
The integrator QUAD (which is called in a nested way by DBLQUAD) has an internal limit on the number of function evaluations it ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Large error between exact analytic answer and numeric integration
Your formulation has many problems. I don't see that you're using a mass matrix with ODE45, and you also have not inverted M, a...

presque 14 ans il y a | 0

Réponse apportée
Problem with matlab, simpsonrule
Looks to me like you're just running out of floating point precision. Double precision has about 16 decimal digits max, and you...

presque 14 ans il y a | 0

Réponse apportée
coverting to c code
CODEGEN is the command-line way, CODER is the graphical user interface. It's the same technology "under the hood". I expect "c...

environ 14 ans il y a | 0

Réponse apportée
why dblquad can not be used to evaluate the bessel function of the second kind bessely
Integrate using QUAD2D and put the singularity on the boundary. >> f = @(x,y)-abs(x-y).*bessely(1,abs(x-y)) f = ...

environ 14 ans il y a | 1

Charger plus