Beantwortet
Finding row index in a matrix in which the sum of the elements is greater than 1
Just do EXACTLY what you said. I'll break it down into pieces. S=[1,0,0;0,1,0;1,1,0;0,1,1;0,0,1] sum(S,2) % sum of the rows s...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
'erfi' not found in my MATLAB while it is in the MathWorks
which erfi -all erfi is part of the symbolic toolbox. It is NOT part of MATLAB proper. If you don't have the symbolic toolbox...

mehr als 3 Jahre vor | 0

Beantwortet
Determine function from Poisson PDF with lambda < 1
I don't see the problem. Yes, you need good data. Not having sufficient data will kill any chances for do anything, but what do ...

mehr als 3 Jahre vor | 0

Beantwortet
How to add commented description on new scripts
It would certainly be easy enough to write a set of tools to do that for you. In fact, that may be what you were using. https:/...

mehr als 3 Jahre vor | 1

Beantwortet
Problem with surf plot shading - equal z values displayed as different colours
This is likely simpler than you think. Or maybe not. The colors for a surface are first chosen by a direct lookup into the curr...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Making a decimal output using three binary inputs
If you have only 3 bits, so {A,B,C}, then one simple solution is to use a dictionary. Or you could just use a table lookup. For ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 1

Beantwortet
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...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

Beantwortet
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 ...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 1

Beantwortet
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...

mehr als 3 Jahre vor | 1

Beantwortet
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...

mehr als 3 Jahre vor | 1

Beantwortet
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 ...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

Beantwortet
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...

mehr als 3 Jahre vor | 0

Mehr laden