# Questions tagged [conditional]

Questions about programming or mathematical constructs that enable verification, selection, or branching behavior when one or more criteria are determined to be True.

427 questions
Filter by
Sorted by
Tagged with
28 views

### Replace element within a list of lists with MemberQ condition [closed]

I'm trying to replace the second element within a list of ordered pairs depending on whether that ordered pair exists within another set. ...
81 views

### How to implement If criteria for the NestList-Function

I have a function which bisects a list in two parts recursively. Unfortunately I have to select a number of iterations for the NesList-function which is just an ...
53 views

### Nested If question

Using the following code, I got the first two piecewise equations right but the third one returns -99. ...
36 views

### How to simplify the conditional expression?

I have an assumption for mulitple value, ...
38 views

### Check an input matrix M contains any nonzero diagonal matrix element or not

Is there a way to easily check an input matrix M contains any nonzero diagonal matrix element or not? For example, if the M contains any nonzero diagonal matrix element, Output: True. if the M ...
39 views

### Restrict the domain of a function (and plot) it) when it depends on the value of a parameter

I know similar questions have been asked, but I am very new at Mathematica and other questions/answers are quite complex and do not suit the code I want to write. I want to restrict the domain of the ...
73 views

### Find interval/range of certain coefficients to prove conditions of eigenvalues

I have seen similar questions to the one I am posting here, but I haven't been able to execute it on Mathematica. I would request some help with the following: I have the following matrix: ...
84 views

### Proving conditions on absolute value of roots of a 5-degree polynomial

**I just need to find conditions on Subscript[[CapitalPhi], [Pi]] such that the fifth root of the polynomial is greater than 1 in absolute value. ** I have a 5-degree characteristic polynomial, for ...
380 views

### An anonymous function with constraints [duplicate]

I'm not very good at working with anonymous functions, a fact that has now come back to bite me. Suppose I have a function defined as follows: ...
280 views

### How to condition arguments of a pure function?

I would like to exclude the point {x=0,y=0} in the function definition ...
94 views

### Find the range of a univariate function over a specific interval of the variable

I would like to find the range of the function below, but only for values of $a$ strictly greater than zero. ...
71 views

### NMinimize over a list of integers

I'd like to minimize some function (of 3-4 variables) over a big list of integers, but not consecutive. Like arr = {5, 10, 7, 101,...} I did not understand this ...
67 views

### How to symbolically evaluate expression within If[]?

I have a function, say f, that needs to take one of two symbolic forms depending on the value of its inputs. This function is part of a very large expression, and I'...