Resuelto


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

más de 8 años hace

Resuelto


Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 1 3 6 9; 0 0 1 3 6; 0 0 0 1...

más de 8 años hace

Resuelto


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

más de 8 años hace

Resuelto


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

más de 8 años hace

Resuelto


Power The Product
EXAMPLE: INPUT x=10 & y=10 OUTPUT z=1000000 or, INPUT x=2 & y=3 OUTPUT z= 216 you just need to calculate the product first...

más de 8 años hace

Resuelto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

más de 8 años hace

Resuelto


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

más de 8 años hace

Resuelto


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

más de 8 años hace

Resuelto


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

más de 8 años hace

Resuelto


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

más de 8 años hace

Resuelto


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

más de 8 años hace

Resuelto


Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

más de 8 años hace

Resuelto


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

más de 8 años hace

Resuelto


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

más de 8 años hace

Resuelto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

más de 8 años hace

Resuelto


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

más de 8 años hace

Resuelto


Phonebook-like problem
strcmpi('Yes', 'No')

más de 8 años hace

Resuelto


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

más de 8 años hace

Resuelto


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

más de 8 años hace

Resuelto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

más de 8 años hace

Resuelto


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

más de 8 años hace

Resuelto


Make a Plot with Functions
Make a plot and test

más de 8 años hace

Resuelto


Frobenius Norm
Write your own version of Frobenius Norm without using the 'norm' function.

más de 8 años hace

Resuelto


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

más de 8 años hace

Resuelto


Rotate it!
Given a set of points, your aim is to rotate it by a given angle "theta" CCW (in 2d). The points are given in a matrix(x) of dim...

más de 8 años hace

Resuelto


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

más de 8 años hace

Resuelto


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

más de 8 años hace

Resuelto


Clipper Function
Create a function that emulates a clipper circuit Given sin wave, t and the constant value for clipping, and the direction to re...

más de 8 años hace

Resuelto


Opposite task convert string hexadecimal numbers array into array of decimal numbers .
Opposite task convert string hexadecimal numbers array into array of decimal numbers . Example x=[ '208'; '209'; '20A'; ...

más de 8 años hace

Resuelto


Find the sum of the negative elements under the main diagonal.
Example Input A=[1 2; -3 0] Output -3

más de 8 años hace

Cargar más