解決済み


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

10年以上 前

解決済み


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

10年以上 前

解決済み


Binary Coder
Take an input number and print the binary value of this number.

10年以上 前

解決済み


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

10年以上 前

解決済み


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

10年以上 前

解決済み


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

10年以上 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

10年以上 前

解決済み


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

10年以上 前

解決済み


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

10年以上 前

解決済み


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

10年以上 前

解決済み


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

10年以上 前

解決済み


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

10年以上 前

解決済み


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

10年以上 前

解決済み


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

10年以上 前

解決済み


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

10年以上 前

解決済み


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

10年以上 前

解決済み


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

10年以上 前

解決済み


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

10年以上 前

解決済み


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

10年以上 前

解決済み


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

10年以上 前

解決済み


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

10年以上 前

解決済み


Return area of square
Side of square=input=a Area=output=b

10年以上 前

解決済み


Equal to their cube
Tell me three real numbers that are equal to their cubes?

10年以上 前

解決済み


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

約11年 前

解決済み


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

約11年 前

解決済み


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

約11年 前

解決済み


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

約11年 前

解決済み


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

約11年 前

解決済み


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

約11年 前

解決済み


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

約11年 前

さらに読み込む