Answered
problem with starting a loop for matrices
MATLAB does not allow an index origin of zero. This means that the FIRST element in a vector, for example, is indexed at number ...

3 years ago | 0

| accepted

Answered
How to generate 1 cycle of a ppg signal repeatedly?
You have a function, that is defined on what seems to be roughly the interval [0,220]. Since you have not given us any data, onl...

3 years ago | 1

Answered
how to get numeric value from expression?
You already know how to use both double and vpa. Both return a number, although vpa returns a floating point number that is stil...

3 years ago | 0

| accepted

Answered
Changing the atan2 function so that it ranges from 0 to 4*pi
Why do you think that the full range is 4*pi? It is not. There are 2*pi radians (360 degrees) in a circle. 4*pi radians is TWO f...

3 years ago | 0

Answered
How to change consecutive duplicate values, so that they are unique
I once wrote an unrounding tool, that did something like what you want to do. The goal I chose was to perform a minimal perturba...

3 years ago | 0

Answered
while loops and prime numbers
First, create a list of all the primes that are less than 100. Save them. You can use either the function primes to do this, or ...

3 years ago | 0

Answered
How do you calculate the minimum circle within a cluster set of data points to potentially identify the ones that are most similar?
Let me give an example. XY = [randn(20,2)*1 + [-5,5];randn(10,2)*1.5 + [3 6];randn(10,2)*1 + [-7 -4]]; plot(XY(:,1),XY(:,2),'o...

3 years ago | 1

| accepted

Answered
How do you calculate the minimum circle within a cluster set of data points to potentially identify the ones that are most similar?
How many times will you ask the same question? You keep on talking about a minimal circle. Sometimes it is to draw a minimal cir...

3 years ago | 1

Answered
Solving for the parameters of a distribution
It is rarely a good idea to try to infer distribution parameters from deep tail percentiles. Those points deep in the tails woul...

3 years ago | 1

Answered
Why do I keep getting a zero for x(9) for Backward subsitution?
First: NEVER use the variable name sum as a variable name. Why not? Becaause one time you will want to use the FUNCTION sum. An...

3 years ago | 1

Answered
System of Equations Yields Complex Numbers Unnecessarily
It is not clear what that system of equations represents, since you have sines of angles in there. Regardless, a complex result ...

3 years ago | 0

Answered
Is it possible to indicate a number with "any" units, tens, or hundreds?
There is not really any trivial way to test for what you want, than to just test for a number in that range. And that will requi...

3 years ago | 0

| accepted

Answered
Finding non trivial solution for a system of equations
This is called a Homogeneous linear system of equations. They are explicitly linear in the unknowns C1 and C2. What that means...

3 years ago | 1

| accepted

Answered
Should this Symbolic Limit be Zero?
Sometimes I wish these tools could tell us where they are stumbling in the solution, when they get stuck. For example, suppose ...

3 years ago | 0

Answered
How can I get the zero crossing contour of a matrix
help contourc For example: v = linspace(-5,5,100); [x,y] = meshgrid(v,v); z = x.^2 - y.^2 + 1; % The contours will be hyperb...

3 years ago | 1

| accepted

Answered
Plotting problem of function in one variable and four known parameters
Does it not tell you the problem? x = 1:5; For example, what do these two operations do in MATLAB for the vector x? x.^2 x^2...

3 years ago | 0

Answered
Taylor Series Figures of e^x
Ok. Now that you have changed the function to one that actually looks like the desired expression... :) My test would be one to...

3 years ago | 0

| accepted

Answered
How do I find the expected value of power in random variable?
There is no simple formula (that does not involve an integration) to compute the expected value of the square of a random variab...

3 years ago | 1

| accepted

Answered
if statement inside of a Function is working only in certain conditions
You don't understand how an if statement works on a vector. For example, what happens when I do this? Surely, in terms of the co...

3 years ago | 1

| accepted

Answered
Random permutation of integers from 1 to n without repetition but for large n
Almost always, when I see someone wanting to solve a problem in this way, it means they are trying to use brute force, thus a br...

3 years ago | 0

Answered
No feasible solution in optimisation in linprog
I posted a question recently to help explain some of the reasons when linprog fails. You should read my first answer, as it disc...

3 years ago | 0

Answered
How may I split a matrix into two based on 0/1 of the first column?
If you will split it into only two matrices, then use named variables as you wish. If you wanted to split it into multiple parts...

3 years ago | 0

Answered
String array of the letters of the alphabet
alf = 'a':'z' It also works for caps. ALF = 'A':'Z'

3 years ago | 0

Answered
Query about dirac delta function
It seems pretty clear. help dirac So dirac(2,w) is the second derivative of that function, at w. yes, I know how can you diffe...

3 years ago | 0

Answered
what does pc1 and pc2 represent?
For example... load fisheriris whos [COEFF, SCORE, LATENT] = pca(meas); So the first component is huge compared to the other...

3 years ago | 1

Answered
How can I use Newton’s Method when I have a 2D domain?
Don't write code for Newton's method, when you can use fzero. Just put a loop around it, and call fzero for each pair of dC/dx a...

3 years ago | 0

Answered
How plot the average sum of three dices versus the number of experiments?
Simple. 3 (fair, so unbiased) dice, numbered 1:6 on the 6 faces. (Not one of those gaming dice with 20 faces or so.) Done over ...

3 years ago | 1

| accepted

Answered
Minimize a function with special constraints
If linprog tells you the problem is unbounded, then it is. What does that mean? Unbounded means there is some direction you can...

3 years ago | 0

| accepted

Answered
Combinations with a condition
Easy enough. x = 0:6; [x1,x2,x3] = ndgrid([0 3 6]); x123 = [x1(:),x2(:),x3(:)]; ind = ismember(sum(x123,2),3*x); x123(ind...

3 years ago | 1

| accepted

Answered
automatic circles that enclose clusters of similar data something like lineCoeff = polyfit(x, y, n) (regression line)
incircle has nothing to do with your problem. Sorry. You would first want to use some sort of clustering algorithm on your dat...

3 years ago | 1

Load more