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

12년 초과 전 | 1

답변 있음
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...

12년 초과 전 | 3

답변 있음
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...

12년 초과 전 | 2

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

| 수락됨

답변 있음
(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...

12년 초과 전 | 1

답변 있음
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...

12년 초과 전 | 0

답변 있음
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 ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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 ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 2

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 2

답변 있음
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...

12년 초과 전 | 2

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 4

| 수락됨

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
Please help with the trig integral
On the line defining fun2, change "fun1" to "fun1(x)".

거의 13년 전 | 0

답변 있음
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...

거의 13년 전 | 0

답변 있음
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...

거의 13년 전 | 1

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

거의 13년 전 | 0

답변 있음
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 ...

거의 13년 전 | 0

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

거의 13년 전 | 0

| 수락됨

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

거의 13년 전 | 0

답변 있음
How can i evaluate this surface integral? (It has some singularities)
When I split the integral up into regions with difficult parts (a couple of circles) on the boundaries, I can get QUAD2D and INT...

거의 13년 전 | 0

답변 있음
Integral2 and array valued functions
Not in the same way. INTEGRAL2 does not support an 'ArrayValued' option. I prototyped it, but testing revealed that it did not...

거의 13년 전 | 2

| 수락됨

더 보기