已解决


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

3 years 前

已解决


Is it prime?
Given a number, check whether it is prime or not. If prime output is true, otherwise false.

3 years 前

已解决


kmph to mph converter
Convert the speed in miles/hour to km/hour.

3 years 前

已解决


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

3 years 前

已解决


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

3 years 前

已解决


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

3 years 前

已解决


Find the function
Given a set of point (x,y) and the coordinate x of a new point, find the y value of new point.

3 years 前

已解决


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

3 years 前

已解决


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

3 years 前

已解决


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

3 years 前

已解决


Inverse of Hilbert matrix
Given a non-negative integer x, return the element-wise power of 2 of the inverse of Hilbert matrix.

3 years 前

已解决


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

3 years 前

已解决


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

3 years 前

已解决


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

3 years 前

已解决


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

3 years 前

已解决


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

3 years 前

已解决


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

3 years 前

已解决


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

3 years 前

已解决


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

3 years 前

已解决


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

3 years 前

已解决


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

3 years 前

已解决


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

3 years 前

已解决


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

3 years 前

已解决


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

3 years 前

已解决


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

3 years 前

已解决


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

3 years 前

已解决


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

3 years 前

已解决


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

3 years 前

已解决


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

3 years 前

已解决


frame of the matrix
Given the matrix M, return M without the external frame.

3 years 前

加载更多