Community Profile

# Arnab Pal

12 total contributions since 2017

View details...

Contributions in
View by

Question

How to split an array by same length and make a matrix?
I have an array. a=[1 2 3 4... 24 25 26 27... 48 49 50... 72] I want a matrix from that array. i.e. b=[1 2 3... 24; 25 26 27......

etwa ein Monat ago | 1 answer | 0

### 1

Question

Return back to a specific line
I have more while and for loop, I need to go beginning. ex: 1. while () 2. for () 3. if (conditi...

5 Monate ago | 1 answer | 0

### 1

Question

Generate 4 positive random numbers. Their summation should be equal to 6776.
Example: Generated random numbers are: [ 689 1158 2589 2340], summation is 6776.

6 Monate ago | 1 answer | 0

### 1

Question

Round to Nearest Multiple of 4.
If my calculation gives, a= 45, I want 44. Some example: 20 would be 20, 13 would be 12, 10 would be 12 or 8. How to round the n...

6 Monate ago | 1 answer | 0

### 1

Question

How to arrange ascending order only one column of a matrix?
Let's say, I have a=[25 10 85 35 71; 1 2 3 4 5] and output shout come b=[10 25 35 71 85; 2 1 4 5 3]

mehr als ein Jahr ago | 2 answers | 0

### 2

Question

How to find position of a number in an array
Let say, a=[7 8 9 2 5 6] what is the position of 8? The answer should come 2 or (1,2). What will happen if there are two same ...

mehr als ein Jahr ago | 1 answer | 0

### 1

Question

How to delete last number from a array?
I need, a=[8 9 5 8 7] to a=[8 9 5 8]. Every time I have to delete only last element. In my case, it will be complicated to delet...

fast 2 Jahre ago | 1 answer | 0

### 1

Question

How to generate random number within a sum limit?
Generate 5 random numbers, where their sum should be less/equal to 50.

fast 2 Jahre ago | 2 answers | 0

### 2

Question

How to check a number is in a array or not?
a=[8 9 6 5 3], I want to know 5 is there or not.

etwa 2 Jahre ago | 2 answers | 0

### 2

Question

How to generate random numbers between two numbers without any specific number?
I want to generate random numbers between 2 and 33. But do not want a(i) number. a(i) can be a single number between 2 to 33.

etwa 2 Jahre ago | 3 answers | 0

### 3

Question

How to detect the repetition of any number in a array?
Say a=[4 5 8 9 4], How to detect this set has repeated numbers? I do not want to know the number, I just want to know that "a se...

etwa 2 Jahre ago | 1 answer | 0