Answered

Not enough input arguments.

I try not to do too many homework problems here because in a former life I was a college professor, and I think it's bad for the...

Not enough input arguments.

I try not to do too many homework problems here because in a former life I was a college professor, and I think it's bad for the...

9 years ago | 3

| accepted

Answered

why I receive message like this"Warning: Function ishermitian has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict" in Matlab 2014

MATLAB added a new built-in function called ishermitian in 2014a. Apparently you have one of your own on the path. Type "which...

why I receive message like this"Warning: Function ishermitian has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict" in Matlab 2014

MATLAB added a new built-in function called ishermitian in 2014a. Apparently you have one of your own on the path. Type "which...

9 years ago | 2

| accepted

Answered

Why Embedded coder generates include to standard C library (<stddef.h> and <string.h>)? How to remove theese includes?

I know next to nothing about it, but perhaps use the CRL (Code Replacement Library) to replace the standard memset with one that...

Why Embedded coder generates include to standard C library (<stddef.h> and <string.h>)? How to remove theese includes?

I know next to nothing about it, but perhaps use the CRL (Code Replacement Library) to replace the standard memset with one that...

9 years ago | 1

Answered

integration of a multiple anonymous function

So if your function g works with a scalar value of c, then you need to vectorize it. You'll have the same problem if you do som...

integration of a multiple anonymous function

So if your function g works with a scalar value of c, then you need to vectorize it. You'll have the same problem if you do som...

9 years ago | 2

| accepted

Answered

INTEGRAL AT THE AREA

First define a function. This function must be able to accept an array and return an array. That is to say, if y1 = f(x1) and ...

INTEGRAL AT THE AREA

First define a function. This function must be able to accept an array and return an array. That is to say, if y1 = f(x1) and ...

9 years ago | 2

| accepted

Answered

avoid imaginary numbers in probabilistic calculation

You haven't told me how you got them, so I can't tell you how to avoid them. Most likely your calculations before calling expin...

avoid imaginary numbers in probabilistic calculation

You haven't told me how you got them, so I can't tell you how to avoid them. Most likely your calculations before calling expin...

9 years ago | 1

Answered

How to write a function and create 3 nested loop then evaluate an integral?

I'm not sure if there is supposed to be a relationship between the t intervals and rho, or whether the fact that there are 15 ro...

How to write a function and create 3 nested loop then evaluate an integral?

I'm not sure if there is supposed to be a relationship between the t intervals and rho, or whether the fact that there are 15 ro...

9 years ago | 1

| accepted

Answered

Integration numerical with variable limits

The INTEGRAL2 interface is set up to calculate an iterated integral where the integral over the second argument of the integrand...

Integration numerical with variable limits

The INTEGRAL2 interface is set up to calculate an iterated integral where the integral over the second argument of the integrand...

9 years ago | 3

| accepted

Answered

"lsqnonlin" constantly stopped for failing to integrate numerically

Is it possible that your problem is singular or highly oscillatory inside the interval of integration for some parameter values?...

"lsqnonlin" constantly stopped for failing to integrate numerically

Is it possible that your problem is singular or highly oscillatory inside the interval of integration for some parameter values?...

9 years ago | 2

Answered

calculating the integral with dummy variables

A "dummy" variable is a variable that is integrated out of the equation. All definite integrals use "dummy" variables in their ...

calculating the integral with dummy variables

A "dummy" variable is a variable that is integrated out of the equation. All definite integrals use "dummy" variables in their ...

9 years ago | 1

Answered

How to determine order and time step size of ode15i

ODE15i is variable-step and variable-order, so "the" step size and "the" order used would each be sequences as long as the numbe...

How to determine order and time step size of ode15i

ODE15i is variable-step and variable-order, so "the" step size and "the" order used would each be sequences as long as the numbe...

9 years ago | 1

Answered

Error in quad function-maximum function count exceeded. "Singularity likely" warning when I use the QUADL function in MATLAB

Is there some important reason why you are using INTEGRAL, QUAD, and QUADL, all three? QUAD and QUADL are deprecated. Use INTE...

Error in quad function-maximum function count exceeded. "Singularity likely" warning when I use the QUADL function in MATLAB

Is there some important reason why you are using INTEGRAL, QUAD, and QUADL, all three? QUAD and QUADL are deprecated. Use INTE...

9 years ago | 2

Answered

ode45 failing to produce a sensible solution

I somewhat disagree with Jan's conception of the limitations of the code. They should be able to handle non-smoothness. Jump d...

ode45 failing to produce a sensible solution

I somewhat disagree with Jan's conception of the limitations of the code. They should be able to handle non-smoothness. Jump d...

9 years ago | 2

Answered

Matlab integration error: Integrand output size does not match the input size

When you see that error, it means that you used a / instead of ./ . The integrator passed in an array for "vectorized" element-...

Matlab integration error: Integrand output size does not match the input size

When you see that error, it means that you used a / instead of ./ . The integrator passed in an array for "vectorized" element-...

9 years ago | 1

Answered

Help on double integral

ffull = @(k,theta,phi)cos(k.*sin(theta).*cos(phi)); qscalar = @(kscalar)integral2(@(theta,phi)ffull(kscalar,theta,phi),0,...

Help on double integral

ffull = @(k,theta,phi)cos(k.*sin(theta).*cos(phi)); qscalar = @(kscalar)integral2(@(theta,phi)ffull(kscalar,theta,phi),0,...

9 years ago | 0

Answered

Strange error using quad2d

I don't know when it will finish, but I made this adjustment to properly vectorize the Fw function (QUAD2D can't accept an array...

Strange error using quad2d

I don't know when it will finish, but I made this adjustment to properly vectorize the Fw function (QUAD2D can't accept an array...

9 years ago | 2

Answered

problem with for and function inside other function

Do not use QUAD. Use INTEGRAL. If you don't have INTEGRAL because your version of MATLAB is too old, use QUADGK. Functions ...

problem with for and function inside other function

Do not use QUAD. Use INTEGRAL. If you don't have INTEGRAL because your version of MATLAB is too old, use QUADGK. Functions ...

9 years ago | 0

| accepted

Answered

how can I evaluate a four fold integral with four variables numerically ?

There's one thing that people often find difficult: the requirement that the integrand accepts arrays and returns arrays, opera...

how can I evaluate a four fold integral with four variables numerically ?

There's one thing that people often find difficult: the requirement that the integrand accepts arrays and returns arrays, opera...

9 years ago | 1

| accepted

Answered

Evaluate numerical Integral by generating function

This bl = @(ln1, ln2) bl+pro; is syntactically wrong. The operation + is not defined on function handles. You need to...

Evaluate numerical Integral by generating function

This bl = @(ln1, ln2) bl+pro; is syntactically wrong. The operation + is not defined on function handles. You need to...

9 years ago | 2

| accepted

Answered

Help on User Defined Function

Sorry we missed this question. The problem is that colon expression lengths are tricky business in MATLAB because the end point...

Help on User Defined Function

Sorry we missed this question. The problem is that colon expression lengths are tricky business in MATLAB because the end point...

9 years ago | 0

Answered

Multiple integrals with limits as variables

function_of_scalar_z_only = @(z)integral2(@(w,l)f(z,w,l),0,L,0,@(w)w); g = @(z)arrayfun(function_of_scalar_z_only,z); De...

Multiple integrals with limits as variables

function_of_scalar_z_only = @(z)integral2(@(w,l)f(z,w,l),0,L,0,@(w)w); g = @(z)arrayfun(function_of_scalar_z_only,z); De...

9 years ago | 0

| accepted

Answered

Error in port widths or dimensions

OK, x is just a scalar. Now how about z, beta, xo, zo, k, x_ba, and z_ba? Assuming they are all scalars, when I run this code ...

Error in port widths or dimensions

OK, x is just a scalar. Now how about z, beta, xo, zo, k, x_ba, and z_ba? Assuming they are all scalars, when I run this code ...

9 years ago | 0

| accepted

Answered

Inf and NaN entities in C-code when using Matlab Coder

Ryan's comment is the answer to this question. The initialize function must be called.

Inf and NaN entities in C-code when using Matlab Coder

Ryan's comment is the answer to this question. The initialize function must be called.

9 years ago | 0

| accepted

Answered

solve in simulink using matlab function block

Keep in mind that extrinsic functions are calculated by calling out to MATLAB, and what comes back is an mxArray which can't be ...

solve in simulink using matlab function block

Keep in mind that extrinsic functions are calculated by calling out to MATLAB, and what comes back is an mxArray which can't be ...

9 years ago | 1

| accepted

Answered

Inconsistency using integral versus quad?

No, INTEGRAL is extremely reliable, much better than QUAD. Please provide me with a complete, running example that demonstrates...

Inconsistency using integral versus quad?

No, INTEGRAL is extremely reliable, much better than QUAD. Please provide me with a complete, running example that demonstrates...

9 years ago | 0

| accepted

Answered

ODE method issue in matlab

If the derivative odefun(t,y) depends on the four "control" functions of t (or even of both t and y), then these functions would...

ODE method issue in matlab

If the derivative odefun(t,y) depends on the four "control" functions of t (or even of both t and y), then these functions would...

9 years ago | 0

| accepted

Answered

Integrate function that calls a function

Except when computing array-valued integrals, the INTEGRAL function requires that the integrand function be coded to accept _arr...

Integrate function that calls a function

Except when computing array-valued integrals, the INTEGRAL function requires that the integrand function be coded to accept _arr...

9 years ago | 1

| accepted

Answered

integrate multivariable function with infinity bounds?

This is not how to compute a quadruple integral. See, for example, my answer here: http://www.mathworks.in/matlabcentral/ans...

integrate multivariable function with infinity bounds?

This is not how to compute a quadruple integral. See, for example, my answer here: http://www.mathworks.in/matlabcentral/ans...

9 years ago | 0

Answered

Geting error while using quadgk for quadruple integral

If you want to integrate a function of 4 variables, f(theta1,theta2,w,z), try iterating it as a single integral of a triple inte...

Geting error while using quadgk for quadruple integral

If you want to integrate a function of 4 variables, f(theta1,theta2,w,z), try iterating it as a single integral of a triple inte...

9 years ago | 1

| accepted

Answered

normrnd, normpdf, pdf not working for code generation

If you're using 2013a or earlier, they aren't supported. If you're using 2013b or later, they are supported. You'll need the o...

normrnd, normpdf, pdf not working for code generation

If you're using 2013a or earlier, they aren't supported. If you're using 2013b or later, they are supported. You'll need the o...

9 years ago | 0

| accepted