Solved


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

14 days ago

Solved


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

14 days ago

Solved


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

14 days ago

Solved


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

15 days ago

Solved


Log of a number
Write a script that will give the log of x as output.

15 days ago

Solved


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4]

15 days ago

Solved


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

15 days ago

Solved


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

15 days ago

Solved


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

15 days ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

15 days ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

15 days ago

Solved


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

15 days ago

Solved


Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.

15 days ago

Solved


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

15 days ago

Solved


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

15 days ago

Solved


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

15 days ago

Solved


What is the next step in Conway's Life?
Given a matrix A that represents the state of Conway's game of Life at one instant (time t=n), return the matrix B that represen...

15 days ago

Solved


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

15 days ago

Solved


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

15 days ago

Solved


For a rectangle, if x is the length and 2x is width. Then find out x from the area of the rectangle?
For a rectangle, if x is the length and 2x is the width. Then find out x from the area of the rectangle? if the area is equal...

15 days ago

Solved


compter le nombre de zéros dans une matrice
écrire une fonction count_zeros qui prend en entrée une matrice M et détermine le nombre de zéros dans une matrice

15 days ago

Solved


Moyenne pondérée
Ecrire une fonction qui prend en entrée un vecteur P et un vecteur V et calcule la moyenne pondérée MP des élements vi d'un vec...

15 days ago

Solved


Get Next Combination
Return next combination For example three-element combinations of 1:5 1 2 3 1 2 4 1 ...

15 days ago

Solved


Recaman Sequence - I
Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow; seq(0) = 0; for n > 0, seq(n) ...

15 days ago

Solved


Van Eck's Sequence's nth member
Return the Van Eck's Sequence's nth member. For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...

15 days ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identic...

15 days ago

Solved


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

15 days ago

Solved


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

15 days ago

Load more