A résolu


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

9 jours il y a

A résolu


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

9 jours il y a

A résolu


Remove the Zero
Given an array n, remove all zeros

9 jours il y a

A résolu


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

9 jours il y a

A résolu


Perimeter of a quadrilateral
There are four cars starting at a point. The first car points north, the second one points east, the third one points south, an...

9 jours il y a

A résolu


Calculate SNR in dB using original signal and quantized signal
origs: the original signal quants: the quantized signal *hint* : need to calculate the quantization error and plug into SN...

9 jours il y a

A résolu


Summing the last column column
Given a matrix, return the sum of the last column of the array.

9 jours il y a

A résolu


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

9 jours il y a

A résolu


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

9 jours il y a

A résolu


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

9 jours il y a

A résolu


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

9 jours il y a

A résolu


Create a magic square matrix for a given odd integer
A magic square of size 'N' is a matrix that satisfies the following criterias: # Dimension - NxN # Matrix should contain ALL...

9 jours il y a

A résolu


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

9 jours il y a

A résolu


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

9 jours il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

10 jours il y a

A résolu


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

10 jours il y a

A résolu


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

10 jours il y a

A résolu


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

10 jours il y a

A résolu


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

10 jours il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

10 jours il y a

A résolu


Remove the middle element from a vector
Remove the middle element of a vector? *Example:* [1,2,3] should return 2 [1,2,3,4] should return 2 [] should return...

10 jours il y a

A résolu


Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10]. Find whether the number n is present in given array or not. If the number n is prese...

10 jours il y a

A résolu


Upper case and lower case!

10 jours il y a

A résolu


ASCII Code
Using matlab, give the symbol that is associated with ASCii code 90.

10 jours il y a

A résolu


Escape from Planet ....
Given a Planets mass M, and raduis r. Calculate the surface escape velocity and the escape velocity at height h. and the diff...

10 jours il y a

A résolu


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

10 jours il y a

A résolu


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

10 jours il y a

A résolu


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

10 jours il y a

A résolu


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

10 jours il y a

A résolu


Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

10 jours il y a

Charger plus