A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

plus de 11 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...

plus de 11 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...

plus de 11 ans il y a

A résolu


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

plus de 11 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

plus de 11 ans il y a

A résolu


Area of rhombus
Calculate the rhombus area

plus de 11 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

plus de 11 ans il y a

A résolu


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

plus de 11 ans il y a

A résolu


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

plus de 11 ans il y a

A résolu


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

plus de 11 ans il y a

A résolu


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

plus de 11 ans il y a

A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

plus de 11 ans il y a

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

plus de 11 ans il y a

A résolu


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

plus de 11 ans il y a

A résolu


reverse string
input='rama' output='amar'

plus de 11 ans il y a

A résolu


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

plus de 11 ans il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

plus de 11 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 11 ans il y a

A résolu


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

plus de 11 ans il y a

A résolu


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

plus de 11 ans il y a

A résolu


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

plus de 11 ans il y a

A résolu


kmph to mps
convert kilometer per hour to meter per second

plus de 11 ans il y a

A résolu


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

plus de 11 ans il y a

A résolu


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

plus de 11 ans il y a

A résolu


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

plus de 11 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

Charger plus