A résolu


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

plus de 5 ans il y a

A résolu


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

plus de 5 ans il y a

A résolu


square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared y = x; end

plus de 5 ans il y a

A résolu


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

plus de 5 ans il y a

A résolu


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

plus de 5 ans il y a

A résolu


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

plus de 5 ans il y a

A résolu


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

plus de 5 ans il y a

A résolu


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

plus de 5 ans il y a

A résolu


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

plus de 5 ans il y a

A résolu


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

plus de 5 ans il y a

A résolu


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

plus de 5 ans il y a

A résolu


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

plus de 5 ans il y a

A résolu


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

plus de 5 ans il y a

A résolu


Find out Harmonic mean.
Find out Harmonic mean.

plus de 5 ans il y a

A résolu


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

plus de 5 ans il y a

A résolu


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

plus de 5 ans il y a

A résolu


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

plus de 5 ans il y a

A résolu


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

plus de 5 ans il y a

A résolu


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

plus de 5 ans il y a

A résolu


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

plus de 5 ans il y a

A résolu


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

plus de 5 ans il y a

A résolu


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

plus de 5 ans il y a

A résolu


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

plus de 5 ans il y a

A résolu


Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...

plus de 5 ans il y a

A résolu


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

plus de 5 ans il y a

A résolu


Phonebook-like problem
strcmpi('Yes', 'No')

plus de 5 ans il y a

A résolu


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

plus de 5 ans il y a

A résolu


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

plus de 5 ans il y a

A résolu


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

plus de 5 ans il y a

A résolu


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

plus de 5 ans il y a

Charger plus