Answered
How do I plot an equation with an imaginary quantity?
Look at what you have. t=[0:0.01:10]; y=exp(-5*i*t); y(1:5) ans = 1 + 0i 0.99875 - 0.049979i ...

7 years ago | 0

Answered
Generate random Bistochastic matrix with zero diagonals
Hmm. I notice that the re-normalization trick offered by dpb sometimes seems to not converge well. That begs the question of wh...

7 years ago | 0

Answered
matalb convolution with memory
This is not a job for convolution, since h lies on both sides of the equality, with a lag on h. Use filter instead. You should...

7 years ago | 0

Answered
Compare and modify random vector with evenly spaced vector
Again, learn to use the tools in MATLAB. The first was linspace. A second is discretize. A=[0.1, 0.21, 0.346, 0.59, 0.744, 1]; ...

7 years ago | 2

| accepted

Answered
re-looping after terminating
Trivial. Put the code INSIDE function. LEARN TO USE FUNCTIONS!!!!!! LEARN TO USE FUNCTIONS! LEARN TO USE FUNCTIONS! There, I sa...

7 years ago | 0

Answered
Solve not finding trivial zero
As always, you absolutely need to tell what release you are using, because this works with no problem. Done using R2019a: syms ...

7 years ago | 0

| accepted

Answered
Matrix subtraction within Matlab
whos Name Size Bytes Class Attributes E 2x1 16 double ...

7 years ago | 3

Answered
Curve fitting WITHOUT toolbox and removing outliers from data.
There is no standard method. Why not? because outliers are different things from what you have normally, and vary for each probl...

7 years ago | 0

Answered
natural cubic spline interpolation
Learn to use the debugger. This is a basic problem. You know what line the problem is on, but even if you did not, then you coul...

7 years ago | 0

Answered
Finding intersection using Newtons method
Firt, why are you writing rootfinding code, when tools like fzero exist? Don't write poorly written code when well written code ...

7 years ago | 0

Answered
Is there any way to use intervals(Intlab) instead of real numbers when optimizing in Matlab?
The simple answer is, you probably can't. Think about how an optimization might work, Newton's method, for example. Given a st...

7 years ago | 0

| accepted

Answered
Why doesn't my fit converge?
Assuming you have some good reason to want to do this (something I seriously doubt is a good reason)... Why is it not convergin...

7 years ago | 0

| accepted

Answered
Assume and find different possible unknown variables of inequalities , Need help please
First, you cannot write a pair of inequalities that way in MATLAB. It works as a conventional form, because people know what you...

7 years ago | 0

Answered
How to solve this system of ODEs
You have ONE equation, not a system of ODEs. (a * dy/dt) + (b * y) = (c * dx/dt) + (d * x) But suppose you knew the true so...

7 years ago | 1

| accepted

Answered
isprime function seems to have poor performance
First, using isprime to test for primality of a Mersenne number is a bad idea. The Lucas-Lehmer test, is as I recall, much more ...

7 years ago | 3

| accepted

Answered
How can I solve a complicated symbolic integral
Your need is not relevant. Mathematics is not something that just works because you want it to. (Unless you have a magic wand, a...

7 years ago | 1

Answered
MATLAB for invoice comparisons
Of course it can. It would require learning MATLAB. It would require a clear understanding of what you are comparing, and what ...

7 years ago | 0

Answered
Integers can only be combined with integers of the same class, or scalar doubles.
READ THE ERROR MESSAGE! R = uint8(1:5); >> R./double(R) Error using ./ Integers can only be combined with integers of the ...

7 years ago | 0

Answered
How to change non zero value into 0?
You want to reset the last 10 non-zeros to zero, in each column. So, let me build an example matrix. A = rand(20,5) > 0.25 A =...

7 years ago | 3

Answered
How to generate matrices that satisfies constraints on sum of row elements and sum of column elements?
You have 9 unknowns, with 6 linear equality constraints. The unknowns are bounded between 0 and 100. You don't say an upper boun...

7 years ago | 1

Answered
Matrix Equality Check Failed Using == and isequal
NEVER test for exact equality of floating point matrices. It won't happen, at least not unless you are very, very lucky. a_inv ...

7 years ago | 0

| accepted

Answered
randperm non uniformly distributed
Sigh. This is NOT a question of non-uniformity. Just a question of not understanding how to recognize non-uniformity, and partia...

7 years ago | 1

| accepted

Answered
How to plot below multivalued function
But it is not a function, in some standard mathematical sense of the word. https://en.wikipedia.org/wiki/Function_(mathematics)...

7 years ago | 0

Answered
How to do discontinuous piecewise linear model fitting?
SLM is not designed to solve the discontinuous linear case, nor would I ever decide to modify the code to allow that. (Sorry, bu...

7 years ago | 2

| accepted

Answered
lagrangian polynomial function giving the incorrect answer
A good try at some code, with three errors in it. Well, essentially two errors, but you made one of those errors twice so I'm no...

7 years ago | 2

| accepted

Answered
Vector integration; is this the most correct and/or accurate calculation?
This is a slightly complex question. Is it the correct use of trapz? Of course. Is it the most accurate possible way to integr...

7 years ago | 0

| accepted

Answered
how to pick up all combination of numbers from multiple vectors
Don't store your vectors separately. Instead, learn to use tools like cell arrays, which make things hugely more efficient. V =...

7 years ago | 5

| accepted

Answered
How can I solve the non linear algebraic equation system with a parameter
You CANNOT use fsolve with a symbolic parameter in the problem. CANNOT. Fsolve is a numerical tool. It finds a root (if it can t...

7 years ago | 0

Answered
How can I solve a sparse linear system efficiently in MATLAB?
B changes in each iteration. It is different. We are given no clue as to how it changes, or how much. We don't even know anythin...

7 years ago | 0

Answered
Repeat numbers of X based on Y to produce Z
help repelem

7 years ago | 0

Load more