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

11년 초과 전 | 0

| 수락됨

답변 있음
Eliminate zero and negative roots by Embedded Matlab Function
The input u is fixed-size, so it is impossible to delete elements from it. Instead, copy it to a variable-size array and then d...

11년 초과 전 | 0

답변 있음
Integrating indefinite integrals without Symbolic
First of all, when working with indefinite integrals numerically, we will need to fix the constant of integration. This is usua...

거의 12년 전 | 1

| 수락됨

답변 있음
How to generate C code for both .m file and simulink?
It's hard to remember what all was supported in 2008b, and I'm also not a Simulink expert. What does your MATLAB script really ...

거의 12년 전 | 0

답변 있음
Use nargin/nargout on generated mex Functions
Not sure why this question slipped through unnoticed. I've created an enhancement request to make nargin and nargout work when ...

거의 12년 전 | 0

답변 있음
Z must be a matrix, not a scalar or vector
It's telling you that the variable "sol" is a vector, whereas X and Y are matrices. If you want to plot a set of points on a sur...

거의 12년 전 | 0

답변 있음
MATLAB Coder and Intel C++ Compiler
The "for all features" is just what gets put into the table when there isn't any distinction made. It means that support is "al...

거의 12년 전 | 0

| 수락됨

답변 있음
Use quadgk with multiple Inputs with Matlab Coder
I don't have a lot of time to type this. Hopefully if it isn't clear I can come back and add some detail. The way we normall...

거의 12년 전 | 2

| 수락됨

답변 있음
how to decrease the tolerence or accuracy of my results
Youseff, I did not try to read your code, but I see integral2() in there, and you mention not knowing how to use reltol and abst...

거의 12년 전 | 0

답변 있음
How can I evaluate a Double Integral with an additional variable dependent integral contained inside using dblquad?
I forget DBLQUAD's arcane requirements on the input sizes. If memory serves, the integrand has to work when one is a vector and...

거의 12년 전 | 0

답변 있음
Numerical integration in a loop
Is this what you mean? omega_11 = pi; % or whatever t = 0:0.01:5; Q = zeros(size(t)); % Preallocate Q for the sake of...

거의 12년 전 | 0

답변 있음
Is any way in Matlab to perform definite integral with conditions in the integration domain?
I'm not sure I understand your clarification correctly. Here is my best guess >> f = @(x)(x.^2+3*x).*(x <= 100) + x.^3.*(x...

대략 12년 전 | 1

| 수락됨

답변 있음
How to evaluate this integral in Matlab?
Sorry I missed this question back in October. It is not easy to do these problems because one has to keep track of what works w...

대략 12년 전 | 0

답변 있음
how to clear variables in code generation ?
What problem are you trying to solve by clearing variables? Have you verified that it is still a problem with code generation? ...

대략 12년 전 | 0

답변 있음
Integration of function with two variables with respect to one of them
Here's an example. While it's _literally_ true that you can't do numerical integration with free variables, sometimes it misses...

대략 12년 전 | 0

답변 있음
How to solve a threedimensional integral of a nested function?
The devil here must be in the details. The example you give is easy enough >> g = @(x,y,z) x.*y.*2.*z; >> f = @(x,y,z) ...

대략 12년 전 | 1

| 수락됨

답변 있음
How do I numerical integrate polynomial coefficients to a high order?
Suppose p is a polynomial in MATLAB (a vector of coefficients). Multiplying by x^2 and integrating could be done by Q = i...

대략 12년 전 | 0

| 수락됨

답변 있음
Numeric integration of a matrix using integral2()
This is an advanced exercise for using integral2. I _think_ this does what you wanted. The approach is to work with all scalar...

대략 12년 전 | 0

답변 있음
numerical integraion with array limits
Assuming you want each individual integral to be integral(@(x)lognpdf(b(j)-x,2,1),a(j),b(j)) then Qab = @(aj,bj)in...

대략 12년 전 | 0

| 수락됨

답변 있음
How to compute Double Integral of highly oscillating function?
So I assume you saw this: >> a = 10; >> f = @(x,y)sin(a*(x-y)) f = @(x,y)sin(a*(x-y)) >> integral2(f,0,10...

대략 12년 전 | 1

답변 있음
Trouble when using dblquad for product of functions
Your integrand function is not defined to be symmetric. We have dtemp(1,2) = dblquad('integrand',(0+(m)*h),(0+(m+1)*h),(0+...

대략 12년 전 | 0

| 수락됨

답변 있음
How can i know the size of the rectangles in a numerical integration?
All the INTEGRAL and QUAD* functions are adaptive quadrature routines. INTEGRAL2 with the 'tiled' method transforms the integra...

대략 12년 전 | 0

답변 있음
finding a number that satisfies given conditions
Integrals? Not sure about that. A random search will finish faster. There are LOTS. You can use LINSPACE to generate evenly s...

대략 12년 전 | 1

답변 있음
Declaring const variable in generated code
This is a common request in one form or another. A common variant is that people would like to have numeric constants #defined ...

대략 12년 전 | 1

답변 있음
How can I concatenate matrices in an embedded matlab function block in simulink?
Kaustubha's comment is the answer to this question. Use coder.varsize to give s.a the variable-size properties that you need. ...

대략 12년 전 | 1

답변 있음
Not getting the same answer between Matlab and Simulink
Considering complexity of the operation, those are the same answers. All meaningful requirements on floating point numbers are ...

대략 12년 전 | 1

답변 있음
Row/Col major order in mex function
I have written numerical library routines for the better part of the last 25 years, and it didn't take me very long to realize t...

12년 초과 전 | 3

답변 있음
Coder: Exclude/ignore code sections?
You can wrap them with if coder.target('MATLAB') ... end Or if that gives an error, if isempty(coder.target) ...

12년 초과 전 | 6

| 수락됨

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

12년 초과 전 | 1

| 수락됨

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

12년 초과 전 | 0

더 보기