A résolu


Matrix Pattern 6

presque 4 ans il y a

A résolu


Matrix Pattern 5

presque 4 ans il y a

A résolu


Matrix Pattern 2

presque 4 ans il y a

A résolu


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

presque 4 ans il y a

A résolu


Matrix Pattern 4

presque 4 ans il y a

A résolu


Matrix Pattern 3

presque 4 ans il y a

A résolu


Matrix Pattern 1

presque 4 ans il y a

A résolu


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: a=[3 4 5]; b=[...

presque 4 ans il y a

A résolu


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

presque 4 ans il y a

A résolu


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

presque 4 ans il y a

A résolu


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

presque 4 ans il y a

A résolu


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

presque 4 ans il y a

A résolu


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

presque 4 ans il y a

A résolu


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

presque 4 ans il y a

A résolu


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

presque 4 ans il y a

A résolu


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

presque 4 ans il y a

A résolu


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

presque 4 ans il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

presque 4 ans il y a

A résolu


modular arithmetic
Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

presque 4 ans il y a

A résolu


Extract Built In Functions and Toolbox Functions from String or Function Handle
Find the Built-In functions and Toolbox functions in either a string or a function handle. Generate a string of alphabetized ...

presque 4 ans il y a

A résolu


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

presque 4 ans il y a

A résolu


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

presque 4 ans il y a

A résolu


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

presque 4 ans il y a

A résolu


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

presque 4 ans il y a

A résolu


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

presque 4 ans il y a

A résolu


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

presque 4 ans il y a

A résolu


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

presque 4 ans il y a

A résolu


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

presque 4 ans il y a

A résolu


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

presque 4 ans il y a

A résolu


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

presque 4 ans il y a

Charger plus