Solved

Reverse the elements of an array

Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

3 mesi ago

Solved

Find 100 from a Matrix and Replace With 0 with less computation time

pls use this matrix x = [208 40 167 180 112 70 192 215 90 19 231 100 9 100 97 100 ...

3 mesi ago

Solved

Remove all the consonants

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

3 mesi ago

Solved

BASICS - sum part of vector

Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

3 mesi ago

Solved

Flipping

Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

3 mesi ago

Solved

Sum of series I

What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

3 mesi ago

Solved

Sum of the Multiplication of Vectors

Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

3 mesi ago

Solved

Get the length of a given vector

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

3 mesi ago

Solved

Matlab Basics II - Max & Index of Max

Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

3 mesi ago

Solved

Squaring Matrix

Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

3 mesi ago

Solved

Find out total non zero element of matrix

Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

3 mesi ago

Solved

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

3 mesi ago

Solved

Find out of matrix transpose Complex conjugate

Find out of matrix transpose Complex conjugate A=[2 3+i;1 4+i] Then answer must be [2.0000 1.0000; ...

3 mesi ago

Solved

Gamma Function

Evaluate the <http://en.wikipedia.org/wiki/Gamma_function/ Gamma Function>. Gamma_val(0) = Inf Gamma_val(1.2) = 0.9182

3 mesi ago

Solved

Rotate Matrix @180 degree

Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

3 mesi ago

Solved

Find out sum of all elements of given Matrix

Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

3 mesi ago

Solved

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

3 mesi ago

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

3 mesi ago

Solved

Derivative of polynomial

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

3 mesi ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

3 mesi ago

Solved

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

3 mesi ago

Solved

Beginner's Problem - Squaring

Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

3 mesi ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

3 mesi ago

Solved

Output any real number that is neither positive nor negative

Output any real number that is neither positive nor negative

3 mesi ago

Solved

Program an exclusive OR operation with logical operators

Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

3 mesi ago

Solved

Replace 0 to NaN!

In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

3 mesi ago

Solved

Number of toolboxes?

Return a number equal to the number of toolboxes available to the Cody solvers.

4 mesi ago