Statistica
0 Problemi
29 Soluzioni
RANK
N/A
of 300.331
REPUTAZIONE
N/A
CONTRIBUTI
0 Domande
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
0.00%
VOTI RICEVUTI
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Risolto
Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3
oltre un anno fa
Risolto
Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...
oltre un anno fa
Risolto
Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...
oltre un anno fa
Risolto
Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...
oltre un anno fa
Risolto
Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...
oltre un anno fa
Risolto
Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what ag...
oltre un anno fa
Risolto
Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...
oltre un anno fa
Risolto
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
oltre un anno fa
Risolto
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
oltre un anno fa
Risolto
Given a string s, find the length of the longest substring without repeating characters.
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" O...
oltre un anno fa
Risolto
Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...
oltre un anno fa
Risolto
Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...
oltre un anno fa
Risolto
Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...
oltre un anno fa
Risolto
Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...
oltre un anno fa
Risolto
Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...
oltre un anno fa
Risolto
Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...
oltre un anno fa
Risolto
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...
oltre un anno fa
Risolto
Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...
oltre un anno fa
Risolto
Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...
oltre un anno fa
Risolto
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...
oltre un anno fa
Risolto
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
oltre un anno fa
Risolto
Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...
oltre un anno fa
Risolto
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.
oltre un anno fa
Risolto
Get the length of a given vector
Given a vector x, the output y should equal the length of x.
oltre un anno fa
Risolto
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
oltre un anno fa
