Questions tagged [minimum]

Minimum refers to the value in a collection of values that is the least or smallest.

In mathematics, the minimum of a function is the smallest value that the function takes at a point either within a given neighborhood (local or relative minimum) or on the function domain in its entirety (absolute minimum).

Examples

Python

>> import numpy as np
>> np.min([0, 1, 2])
0

See also

1056 questions
-1
votes
1 answer

MIPS findmin of array function

Hello I am getting exception 7 [bad data address] for the following findMin number in an array function. The length of the array is already in $a1, and the address of the start of the array is in $a0. I want to have the min in $v0 after all is said…
-1
votes
1 answer

JavaScript cant get max or min value or an array

hello i have an array and i cant seem to get the minimum and maximum value of it idk what is wrong here is my code var repeat, studentArr = [], markArr = []; while (repeat !== 'n' && repeat !== 'N'){ studentArr.push(prompt("Enter Student…
HelloWorld
  • 133
  • 1
  • 15
-1
votes
1 answer

How to get the minimum value of a keys in dictionary?

For example: {1: 21, 2: 17, 3: 21} the code would return 17 also it would have to work if theres only 1 item in the dictionary. {1:5} would return 5 Thanks!
-1
votes
2 answers

finding minimum in a column based on a unique id in r

Need some help with a simple r command to do something that is done through pivots in excel. I have a table with 2 variables ID and date. I need a command that can create a dataframe which has the unique list of these IDs and the minimum date…
Murali
  • 135
  • 1
  • 1
  • 8
-1
votes
4 answers

Function to get minimum of three or more arguments

In the library in C, the function fmin(x,y) returns the minimum value of the two arguments x and y, as documented for instance in the C++ reference. However, is there a similar function fminimum(a,b,c,...x,y,z) available that finds the…
seb
  • 2,251
  • 9
  • 30
  • 44
-1
votes
4 answers

Python - Syntax error for taking minimum of tuple by second element

I want to create a list of tuples with first element from a list, and the second element from a function of the element of list, then find the minimum from the output of the function. The code below best explains what I want: x,y = min((x,f(x) for x…
SeeknInspYre
  • 360
  • 1
  • 3
  • 16
-1
votes
1 answer

How to plot the minimum mean of plot Horizontal Integral projection?

I have to make a plot (with matrix M N)from binary image. I use Horizontal Integral Projection which to find the mean of the rows. After that, I want the minimum mean coordinate make a horizontal line. How to make the horizontal line?
-1
votes
1 answer

Minimum bounding rectangle, when 3D shape is not known...only that it fits a 3D matrix?

I've searched for this algorithm, including on stackoverflow, but did not find one. Unlike finding the minimum bounding rectangle for a known 3D figure, I'm trying to find one, axis-aligned, for an arbitrary, solid, continuous, 3D figure...the only…
-1
votes
1 answer

All combinations of objects in array

I have an array with numbers in it and want to loop through all combinations of them to calculate a minimum difference between the selected numbers and the rest. How would such a loop look like? I've tried to find a solution, but somehow it doesn't…
user
  • 85
  • 7
-2
votes
4 answers

first minimum value from given values in C++

string result; double zpls, zmin, ypls, ymin, xpls, zmin ; zpls = 4.2; zmin = 0; ypls = -2; ymin = 4.2; xpls = 6; xmin = 8; How to find "first minimum positive" among these values and set result = "+Z";// or…
Raj
  • 107
  • 2
  • 10
-2
votes
2 answers

Getting Maximum and Minimum Int instead of Input

I am trying to gather input from the user, and then denote which one of their numbers is the highest, and which one is the lowest. int highest = Integer.MAX_VALUE, lowest=Integer.MIN_VALUE, number=0; Scanner input = new Scanner(System.in); for…
-2
votes
5 answers

How can I use min() without getting "0" or "" for an answer?

I'm trying to use min in a list that came from a .csv and some of the values are '' how can I ignore those and also "0"? I tried index1 = (life_expectancy.index(min(life_expectancy,))) print(life_expectancy[index1]) and got nothing, when i…
LuigiMopi
  • 19
  • 4
-2
votes
1 answer

Calculating minimum of a list of numbers — output error

I have created a program in C to calculate the average, variance, maximum, and minimum of a list of numbers that user inputs, and the number of user inputs is decided by the first user input. #include #include int main(int argc,…
Steven Oh
  • 382
  • 3
  • 14
-2
votes
1 answer

How to create a new column based on minimum value from another column

I have a dataframe with a lot of columns and rows (> 10000), but I need to create a column based on the minimum value from another one Example dataframe: enter image description here So, I need the column "Cantidad min" to contain the minimum value…
-2
votes
2 answers

Minimum and maximum value

I ran this code, everything finds. maximumValue shows the correct output, however, minValue always shows 0 as the output. Scanner sc = new Scanner(System.in); int x= sc.nextInt(); int[] day = new int[x]; int minValue = day[0]; int maxValue =…
coder123
  • 1
  • 3