解決済み


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

9ヶ月 前

解決済み


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

9ヶ月 前

解決済み


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

9ヶ月 前

解決済み


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

9ヶ月 前

解決済み


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

9ヶ月 前

解決済み


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

9ヶ月 前

解決済み


Draw a '7' in a zero matrix!

9ヶ月 前

解決済み


Add two numbers
Given a and b, return the sum a+b in c.

9ヶ月 前

解決済み


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

9ヶ月 前

解決済み


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

9ヶ月 前

解決済み


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

9ヶ月 前

解決済み


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

9ヶ月 前

解決済み


Friday or not
I love Friday. Please tell me whether the day is Friday. Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'. Exa...

9ヶ月 前

解決済み


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

9ヶ月 前

解決済み


Converts numbers into characters
Converts numbers into characters

9ヶ月 前

解決済み


the average value of the elements
Calculate the average value of the elements in the array

9ヶ月 前

解決済み


Find the max element of the array
Find the max element of the array

9ヶ月 前

解決済み


to the 2 all elements
to the 2 all elements

9ヶ月 前

解決済み


Double all elements in the array
Duplicate all elements in the array

9ヶ月 前

解決済み


calculate the length of matrix
input 1 array, calculate the length

9ヶ月 前

解決済み


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

9ヶ月 前

解決済み


Sum along each diagonal of a matrix
Write a routine that returns the sums along the diagonals of a given matrix, A, where the first diagonal is the bottom left corn...

9ヶ月 前