Solved


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

8 years ago

Solved


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

8 years ago

Solved


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

8 years ago

Solved


Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

8 years ago

Solved


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

8 years ago

Solved


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

8 years ago

Solved


Combination of Vectors
Return a combination of vectors x1, x2 based on y1, y2 per: x(j) = 0 if y1(j) < y2(j) x(j) = x1(j) if y1(j)...

8 years ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

8 years ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

8 years ago

Solved


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

8 years ago

Solved


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

8 years ago

Solved


Pointwise multiplication of vectors.
Pointwise multiplication of vectors x and y. Example x= [1 3 5 7 9 11 13 15 17 19] y=[ 1 4...

8 years ago

Solved


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

8 years ago

Solved


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

8 years ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

8 years ago

Solved


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

8 years ago

Solved


Calculate feeling temperature before climbing a mountain
I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

8 years ago

Solved


What's for Lunch?
Given b choices of beverages, e choices of entrees, s choices of sides (take two different sides total) and d choices of dessert...

8 years ago

Solved


Create a code for XNOR
Given two inputs, output XNOR of those two

8 years ago

Solved


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

8 years ago

Solved


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

8 years ago

Solved


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

8 years ago

Solved


Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

8 years ago

Solved


Probability of red tulips
I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

8 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

8 years ago

Solved


Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides. Output(b): * Is true if there are any 3 va...

8 years ago

Solved


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

8 years ago

Load more