Respondida
How to use an integral inside another integral
Either this (find_integral is unchanged) function [answer]=find_integral2(z) F=@(y) arrayfun(@(y)find_integral(z-y).*fin...

casi 13 años hace | 1

| aceptada

Respondida
Numerical volume integral with keeping parameters
Well, for starters, you need to change / to ./ in the definition of f. Second, however, you will need to use integral3 instead ...

casi 13 años hace | 0

Respondida
How can I calculate the Chi-Squared CDF if I use MATLAB C-Coder?
This function is now supported for code generation in R2013b.

casi 13 años hace | 1

Respondida
Why Matlab integral function does not work properly?
The problem is that "if" is not vectorized the way you would expect. I think if x > 0 means if all(x(:) > 0) S...

alrededor de 13 años hace | 3

Respondida
Nested integral within integral2
The problem here is that integral2 requires that the integrand accept arrays as inputs and return arrays as outputs, but integra...

alrededor de 13 años hace | 2

| aceptada

Respondida
how to solve a integral when the parameters are matrix
I don't get the final assignment to x(t1) of what I presume to be a matrix result. Also, I am not certain whether e^A means exp...

alrededor de 13 años hace | 0

Respondida
Integration HELP Mie Scattering
Since I don't know much about this application area, I'm not in position to work on the code here. I would approach a problem l...

alrededor de 13 años hace | 0

Respondida
Why does strcmp take numerical arguments?
I think the intent was that the semantics of strcmp be ischar(a) && ischar(b) && strcmp(a,b) where in that expression i...

alrededor de 13 años hace | 1

| aceptada

Respondida
(Numerically) Integrating bump functions --- on R^1 vs R^2 and R^n
Avoid masking the integrand in this manner if possible. It is numerically toxic. INTEGRAL2 is written to accept functional lim...

alrededor de 13 años hace | 1

Respondida
How can I declear a struct array in m file when generating C++ codes through Matlab Coder?
I would use repmat. Initially MATLAB Coder did not support empty struct arrays. Unfortunately, I don't remember when that restr...

alrededor de 13 años hace | 0

Respondida
integral with (sin x)^4
You have two errors. One, you need 1./sqrt instead of 1/sqrt. Second, you have \0.0865^2 instead of /0.0865^2. Here is how to ...

alrededor de 13 años hace | 0

Respondida
double integral and fitted functions
I'm going to treat this like a homework problem. You'll need to define some anonymous functions. For example, if b is a pp-form...

alrededor de 13 años hace | 0

Respondida
MATLAB Coder indexing out of bounds
If x is a scalar passed to this function, then attempting to reference x(2) will error in MATLAB and in MATLAB Coder in exactly ...

alrededor de 13 años hace | 0

Respondida
How to delete rows/columns of a matrix in Embedded Matlab Fcn?
I don't know what version you have. MATLAB Coder does currently support deleting rows and columns from a matrix. You will need...

alrededor de 13 años hace | 2

| aceptada

Respondida
Implementing generalized cosine and sine integrals
Well, first of all, I think we need 0 < k < 2 for the generalized sine integral and 0 < k < 1 for the generalized cosine integra...

alrededor de 13 años hace | 0

Respondida
Porblem in Converting MATLAB code to C using MATLAB Coder
It sounds like you are supplying each of the functions to be compiled. If you do that, you will need to supply the argument typ...

alrededor de 13 años hace | 0

| aceptada

Respondida
How can I make definite integral to Bessel function in the interval from 0 to infinite
I'm not sure I understand the problem. The answer is 1, so use 1 instead of quadgk(f,0,inf). However, if you are concerned abou...

alrededor de 13 años hace | 0

Respondida
Problem with quad: how to handle a loop in the integrand function ?
QUAD, and most of the other integration functions in MATLAB, is written to evaluate the integrand at more than one point at a ti...

alrededor de 13 años hace | 0

| aceptada

Respondida
Matlab Coder: how can I eliminate the date in c-code comments
I agree that this would be a useful thing. The only solution I know about is a "nuclear option". Under "Code Appearance" there...

alrededor de 13 años hace | 2

Respondida
Using MATLAB, what is the best way to find the integral of a bounded range of a CDF?
Well, you _have_ the function as well, not just the vector. If I understand you correctly, integral(@(x)cdf(pd,x),r(1),r(2...

más de 13 años hace | 2

| aceptada

Respondida
Is it possible to convert a global optimization matlab code, using multistart with lsqnonlin , in to c using codegen?
Unfortunately, no. LSQNONLIN is not supported for code generation. It is possible to use functions that are not supported with...

más de 13 años hace | 0

Respondida
How to perform 4D integral in matlab ?
The easiest way to integrate f(x,y,z,w) from a <= x <= b, c <= y <= d, e <= z <= g, and h <= w <= i is Q = integral(@(x)int...

más de 13 años hace | 4

| aceptada

Respondida
How can I prevent the calculation of intermediary results while code generation with the embedded coder?
I think you have misapprehended the source of your problem. The exact mathematical result p1*p2*p3 is 1301.55464561. This numb...

más de 13 años hace | 0

| aceptada

Respondida
Please help with the trig integral
On the line defining fun2, change "fun1" to "fun1(x)".

más de 13 años hace | 0

Respondida
Using Quad2d with indicator function
QUAD2D sends in m-by-m matrices, which you are required to evaluate "elementwise", i.e. if Z = f(X,Y), then Z is the same size a...

más de 13 años hace | 0

Respondida
Anonymous functions and integration
MATLAB files can be flexible when they are combined with the use of anonymous functions. Anonymous functions can also be suppli...

más de 13 años hace | 1

Respondida
dblquad integral strange behaviour
Since adaptive quadrature relies on finite sampling, and the number of initial points tends to be fixed, regardless of interval ...

más de 13 años hace | 0

Respondida
Getting Error using quad2d
Let f be the integrand function and let Z = f(X,Y). QUAD2D requires that # size(Z) matches size(X) and size(Y). The inputs ...

más de 13 años hace | 0

Respondida
numerical integration with nonarray function
It is, indeed, unnecessary to perform numerical integration on this integrand. However, to answer the question in _general_, Th...

más de 13 años hace | 0

| aceptada

Respondida
How to know starting which MATLAB release a particular function was implemented?
INTEGRAL was added in R2012a along with INTEGRAL2 and INTEGRAL3.

más de 13 años hace | 0

Cargar más