A résolu


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

plus de 5 ans il y a

A résolu


Times 5
Try out this test problem first. Given the variable x as your input, multiply it by five and put the result in y. Examples...

plus de 5 ans il y a

A résolu


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

plus de 5 ans il y a

A résolu


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

plus de 5 ans il y a

A résolu


Box
Give the volume of a box, x is equal to the body diagonal.

plus de 5 ans il y a

A résolu


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

plus de 5 ans il y a

A résolu


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

plus de 5 ans il y a

A résolu


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

plus de 5 ans il y a

A résolu


Square
X is a number, write a code, where Y should be the square of X.

plus de 5 ans il y a

A résolu


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

plus de 5 ans il y a

A résolu


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

plus de 5 ans il y a

A résolu


Matrix for beginners
Multiply x and y elemwise.

plus de 5 ans il y a

A résolu


Lights Out 15 - 5x5, broken buttons I
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 14 - 5x5, four stages, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 13 - 5x5, three stages, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 12 - 5x5, three stages, <7 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 11 - 5x5, with wrapping, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 10 - 5x5, with wrapping, 6 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 9 - 5x5, light-only solution? II
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 7 - 5x5, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Lights Out 8 - 5x5, light-only solution? I
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

plus de 5 ans il y a

A résolu


Successive zeros (harder)
The problem is from Problem 45436, <https://www.mathworks.com/matlabcentral/cody/problems/45436-successive-zeros> Suppose n i...

plus de 5 ans il y a

A résolu


Successive zeros
Suppose n is the number of digits a number contains. Now, 12032 - is a valid n=5 digit number. But 10023 - is defined as i...

plus de 5 ans il y a

A résolu


Create a "+" flag
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

plus de 5 ans il y a

A résolu


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

plus de 5 ans il y a

A résolu


Ternary Conditional Operator
Returns one of two expressions depending on a condition. (test) : (expression1) : (expression2) *test:* Any Boolean ex...

plus de 5 ans il y a

A résolu


What can you get for exactly amount of money(harder)
Inspired by "Problem 42996. what can you get for exactly amount of money" <https://ww2.mathworks.cn/matlabcentral/cody/problems...

plus de 5 ans il y a

A résolu


List the households affected by leaks in water distribution
Consider the following water distribution network, where water is pumped uni-directionally from left to right: 8...

plus de 5 ans il y a

A résolu


Place wastewater treatment processes in the correct order
There are many technologies for treating wastewater. For example, grit chambers are used to remove heavy solids, filtration is u...

plus de 5 ans il y a

A résolu


Maximize the production in a plant within equipment capacity
The goal of a certain manufacturing company is to maximize its production of goods per day. In the production flow, there is a s...

plus de 5 ans il y a

Charger plus