Answered
How can we provide minimum distance i.e. 20 between each random generated node?
Um, there isn't a way. Well, not to do it by one simple call. You will need to write code. Given the set of nodes already gen...

9 years ago | 0

| accepted

Answered
How many cores does MATLAB use in a given program?
On my computer... maxNumCompThreads ans = 4 How many cores your code actually uses on any given code is far m...

9 years ago | 0

| accepted

Answered
Is it a precision mistake? Creating a vector goes wrong.
Your numbers are not true integers. format short x = [1.999999 2.0000001 2.99999 3.000000001] x = 2.0000 2....

9 years ago | 0

Answered
Can I do this in Matlab?
Sorry. You cannot copy parts of a toolbox into another directory and have those functions work properly.

9 years ago | 0

| accepted

Answered
Can't solve function to variable fast
Huh? You should NEVER use floating point computations here. You want to find y (the smallest y, if more than one exists) such...

9 years ago | 2

Answered
If the input is 3 we want the output to be 1 2 1
Easy. tri = @(n) (n+1)/2 - abs((1:n) - (n+1)/2) tri(3) ans = 1 2 1 tri(5) ans = 1 ...

9 years ago | 1

Answered
The most efficient way to compute the inversion of a iteratively increased correlation matrix in Matlab
SVD will essentially NEVER speed things up. This is not the purpose of SVD. When used with linear systems of equations, it may h...

9 years ago | 0

Answered
how do I create a matrix whose elements in the same column make Isothermal series
10.^(-1:1)'*(2:4) ans = 0.2 0.3 0.4 2 3 4 ...

9 years ago | 0

Answered
Having trouble with "Matrix is singular to working precision" error, would be glad if you help
As a guess, since a linear algebra divide makes no sense at all here (i.e., you never said anything about solving a linear syste...

9 years ago | 2

Answered
Possible combinatios of integers 0-9 in triads
xyz = dec2base(0:999,10) - '0';

9 years ago | 1

| accepted

Answered
What is meant by HkOnesided in matlab?
This is how you define a variable. That is the name of the variable. If you don't understand this very basic concept, then it is...

9 years ago | 0

| accepted

Answered
Returns and standard deviation groupwise
I'm not sure what you are asking by "daily returns". Perhaps you want a moving mean, on a 250 day time window. That is simple. ...

9 years ago | 0

| accepted

Answered
I need more precision from binocdf. Output appears to be rounded.
1. format has NO impact on the number, just how it is displayed. 2. Computations in MATLAB are done in double precision. The...

9 years ago | 0

| accepted

Answered
Which algorithm can be used to solve this optimization problem
It is not clear what your problem is from the statement. Is this a problem with integer unknowns? If so, then that restricts the...

9 years ago | 0

| accepted

Answered
Can matlab solve this simple factorial equation?
Um, the problem is, this is arguably more complicated than you think. First of all, lets extend the problem to the real line....

9 years ago | 2

Answered
Trapezoidal numerical integration without use of function?
Trapezoidal rule is easy enough. It depends on whether the step is constant or not. The entire point of my response is you need ...

9 years ago | 4

Answered
I would like to solve nonnegative linear least-squares problem using lsqnonneg function. I have this error message: Rank deficient /Exiting: Iteration count is exceeded. What is the problem? Thanks by advance
So you have a highly underdetermined problem. IMPOSSIBLY underdetermined, in fact. You are trying to solve the problem b...

9 years ago | 0

| accepted

Answered
Optmizing areas covered by bricks
Sorry, but this is not even remotely the kind of problem a tool like fmincon (or the other tools in those toolboxes) are designe...

9 years ago | 0

Answered
Request: Global Search / Replace
Sorry, but Answers is not a place to put enhancement requests. If you have an idea, then send it directly to MathWorks. Click on...

9 years ago | 0

Answered
Request: Add Regular Expression Search
Sorry, but Answers is not a place to put enhancement requests. If you have an idea, then send it directly to MathWorks. Click on...

9 years ago | 0

Answered
Request: Exchange Search for Replace
Sorry, but Answers is not a place to put enhancement requests. If you have an idea, then send it directly to MathWorks. Click on...

9 years ago | 0

Answered
How can I draw horizontal X(0,0) single grid line?
This will draw a reference line, with a slope and intercept of 0. refline(0,0) However, I do see that it does show up if...

9 years ago | 0

| accepted

Answered
How to define a function
Are you trying to type this in at the command line? You cannot do that. Use the editor. Save the function as an m-file, on your ...

9 years ago | 0

Answered
How to draw 2 random number simultaneously which are smaller than 1 together?
Well, this does not seem to be homework, else I would not be answering. You appear to want to generate a pair of random numbe...

9 years ago | 1

| accepted

Answered
rand against randn for noise creation
Yes. Use either rand, or randn. Or some other tool. Only YOU know what kind of noise you want to create. If you don't know...

9 years ago | 1

Answered
Integral: Is it better to add integrals with different bounds or use one integral with a sum of characteristic functions as the integrand?
Should you use Heaviside step functions to create an integral that is a piecewise discontinuous function, NO. NO. NO!!!!!! There...

9 years ago | 2

| accepted

Answered
What's the problem?
It works fine, IF you use a valid character for ' a = [1 2 3; 4 5 6; 7 8 9] * [0 1 0]' a = 2 5 8 Th...

9 years ago | 2

| accepted

Answered
Error of 'fminbnd'
No. That is NOT an error in fminbnd. It is an error in your thinking, and your understanding of how numbers are used in a floati...

9 years ago | 0

Answered
How can I make function value symbolic?
If either of x or y are already symbolic, then any computations done on them will also be symbolic. You can create a symbolic...

9 years ago | 0

Load more