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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans 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.

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

Charger plus