Community Profile

photo

Kirsten Findlay


Actif depuis 2016

Followers: 0   Following: 0

Statistiques

  • Commenter
  • Solver

Afficher les badges

Feeds

Afficher par

A résolu


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

presque 8 ans il y a

A résolu


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

presque 8 ans il y a

A résolu


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

presque 8 ans il y a

A résolu


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

presque 8 ans il y a

A résolu


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...

presque 8 ans il y a

A résolu


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

presque 8 ans il y a

A résolu


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

environ 8 ans il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

environ 8 ans il y a

A résolu


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

environ 8 ans il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

environ 8 ans il y a

A résolu


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

environ 8 ans il y a

A résolu


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

environ 8 ans il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

environ 8 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

environ 8 ans il y a

A résolu


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

environ 8 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

environ 8 ans il y a

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

environ 8 ans il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

environ 8 ans il y a

A résolu


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

environ 8 ans il y a

A résolu


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

environ 8 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

environ 8 ans il y a

A résolu


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

environ 8 ans il y a

A résolu


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

environ 8 ans il y a

A résolu


Square a Number
Given an input x, return y, which is equal to the square of x.

environ 8 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

environ 8 ans il y a

A résolu


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

environ 8 ans il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

environ 8 ans il y a

A résolu


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

environ 8 ans il y a

A résolu


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

environ 8 ans il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

environ 8 ans il y a

Charger plus