1,332 total contributions since 2016

Professional Interests: Model-Based Design

Solved

Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.

--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

21 days ago

Solved

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}

if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

22 days ago

Solved

Invert a 3D rotation matrix

Given a 3D rotation matrix, belonging to the matrix group SO(3), compute its inverse without using the functions |inv()| or |pin...

23 days ago

Solved

Calculate Resistance 2

In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

1 month ago

Solved

Determine the length of a string of characters

Determine the length of a string of characters

1 month ago

Solved

find the relation...

if given input is 1, output is 4. if input is 55, output is 3136.

1 month ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

2 months ago

Solved

Calculate Resistance

Calculate Resistance R of a linear conductor having resistivity p, length l and area A

3 months ago

Solved

Add 3 numbers

In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

3 months ago

Solved

Scalar Matrix Manipulation

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

3 months ago

Solved

Cody problems in French : Trouvez la logique Pt.2

Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

3 months ago

Solved

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

3 months ago

Solved

Double the next!

Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

4 months ago

Solved

Determine if input is odd or even

Determine if input is odd or even, sample problem

4 months ago

Solved

Calculate the square of a number (Super Easy)

The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

4 months ago

Solved

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

5 months ago

Solved

Binary code (array)

Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

5 months ago

Solved

Binary

Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

5 months ago

Solved

Flip the bit

Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

5 months ago

Solved

Find the complement of a number in binary

Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

5 months ago

Solved

No Twins?

Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

5 months ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

5 months ago

Solved

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

5 months ago

Solved

You never ask a lady her age

Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

5 months ago

Solved

Optimization of cylinder surface area

Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

5 months ago

Solved

Draw 'B'

Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

5 months ago

Solved

Draw 'I'

Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

5 months ago

Solved

Cube root of max value in a vector

Find the cube root of the maximum value in a vector

5 months ago