Answered
Hi, How can I resolve this error message, please "Array indices must be positive integers or logical values" Below are my lines of code:
This is why it is always important to read the ENTIRE error message, as that will tell you much. And if you don't understand the...

8 years ago | 0

| accepted

Answered
Solving linear matrix equation
I think you do not understand how MATLAB works, how it returns results? Perhaps you have only used other tools like Excel or Mat...

8 years ago | 0

Answered
How to avoid the increasing RAM need of fmincon
Um, what do you expect? When you try to solve an optimization problem, a classical quasi-Newton scheme will have a basic flow...

8 years ago | 0

Answered
possible combination of a number
The trivial solution: loc = A.*B == 50; A1 = A(loc); B1 = B(loc); No, I won't show you how to solve this for signi...

8 years ago | 0

| accepted

Answered
Can anyone help me fix my large straight Yahtzee function in MATLAB?
As I recall, a large straight in that game is one of two cases: the sequence [1 2 3 4 5], OR the sequence [2 3 4 5 6]. So if ...

8 years ago | 0

Answered
Passing a line through 2 determined points of a dataset automatically
Your problem is one of definition. Until you do that, i.e., define what you mean by "middle", you can do nothing. In fact, t...

8 years ago | 0

| accepted

Answered
Simple if loop doesn't work
What if loop? An if is not a loop. And you have no ifs in this code anyway. I'll assume you meant to say a for loop. A while loo...

8 years ago | 1

Answered
How to calculate memory required to do mldivide?
You can't do it in general if the matrix is sparse, because the sparsity pattern of the matrix is the important factor. How many...

8 years ago | 1

| accepted

Answered
Numerically integrate function over 2D ellipse?
James. You clearly have not thought about what I said. I never said you need to use an analytical integration. All I showed was ...

8 years ago | 0

Answered
Optimized filling of sparse matrix using spalloc
DON'T FILL A SPARSE MATRIX SLOWLY. You will virtually never be happy with the result. DON'T create those row and column arrays a...

8 years ago | 0

Answered
Efficient pairwise logical operation on all combinations of vectors?
Note that a big part of the problem may be that you are just doing a LOT of tests, and grabbing pretty large chunks of RAM to do...

8 years ago | 1

| accepted

Answered
Plot a line between 2 points and extend the line a determined distance
Why do you need filline, or anything like it? And why are you worrying about angles, etc.? You are making this far more complex ...

8 years ago | 4

| accepted

Answered
How do I solve over determined system of non linear equation?
Why do people think they need to use syms, just because they don't know the value of a result? (I think that somehow comes from ...

8 years ago | 2

| accepted

Answered
Speed up a procedure that uses ACCUMARRAY and UNIQUE functions
But how much more than 255? You keep being almost evasive in answering questions. For example, this would work, IF the elemen...

8 years ago | 0

Answered
Issue with simpsons rule
What do you mean about "estimating f"? Simpson's rule has absolutely no purpose in estimating a function, merely an integral. ...

8 years ago | 0

| accepted

Answered
Find unknown from the equation with given values
b=a-1; WTP? Since your real problem is apparently more complex than grade school mathematics, use solve. syms a b ...

8 years ago | 0

Answered
i want to solve definite integral with variable limits . can i apply trapezoidal rule for the same?
Can you generate a set of values for t between t0 and t1? Yes. Use linspace. Can you evaluate that function at those points? ...

8 years ago | 0

| accepted

Answered
Force a linsolve solution
NO. You cannot force linsolve to return the solution you wish to see for a non-invertible matrix. At least not without doing som...

8 years ago | 1

| accepted

Answered
Hi. Could you give me some advice on how to import some txt data in MAtlab and perform FFT on the data?
Read this to learn to format code. Then apply it to your data, so it will appear as you want it. <https://www.mathworks.com/m...

8 years ago | 1

| accepted

Answered
How to find different coordinates from an array that satisfies the equation of circle?
This: A = [1:100; 1:100] does NOT generate combinations of those values in a grid. a = 2;b=2;r = 2; [A,B] = mesh...

8 years ago | 0

Answered
non uniform thickness calculations
This will be true whenever you have two nonlinear relationships, describing the upper and lower envelopes. Even if you have two ...

8 years ago | 0

Answered
How to find the highest common dominator of two freqiencies? (2 equations with 3 unknowns)
You want to solve for x, such that x is as large as possible, AND it satisfies 195310 / x == y 16e6 / x == z where bo...

8 years ago | 1

Answered
how can i find values of R
A=[472.3; 861.8; 1675; 1586; 1365; 1076 ;855]; r=2; T=915.6345*10^3; k=A.*0.58; While the correct answer is exactl...

8 years ago | 1

| accepted

Answered
fmincon"Not enough input argument" error Thank you!
How do you define the function value? function out=value(x,state,age,NextVal) So it expects 4 input arguments. How do...

8 years ago | 0

Answered
Create Line Paths Between Non-Uniformly Distanced Neighbors
No, there are no premade functions to do it (that I know of.) As well, you are going to have a difficult time identifying things...

8 years ago | 0

Answered
Solution of system of linear equation
First, why do you think this is a system of LINEAR equations? theta is one of your unknowns. The presence of sin(theta) and ...

8 years ago | 0

Answered
How do I use GA to optimize the variables, while keeping the objective function at a certain point?
There are still significant problems in what you want to do. Can you use GA to solve it? Well, no, not really in any rational wa...

8 years ago | 0

Answered
Normal distribution random variable
This is an extremely confusing question. Usually, that implies the person asking it is also confused. It sounds like you have...

8 years ago | 0

Answered
2d grid interpolation to receive x-value
There are serious potential problems here, ones that may not be solved using scatteredInterpolant as KSSV suggests. Lets look...

8 years ago | 0

Answered
Optimization/Dynamic Programming to Find Least Sum from Elements of Two Arrays
If I had to guess, you want to select 5 elements, from either A, OR B, but you need to select exactly 5 elements, and you cannot...

8 years ago | 2

| accepted

Load more