A résolu


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

presque 10 ans il y a

A résolu


Square a Number
Given an input x, return y, which is equal to the square of x.

presque 10 ans il y a

A résolu


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

presque 10 ans il y a

A résolu


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

presque 10 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

presque 10 ans il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

presque 10 ans il y a

A résolu


Solution to Ax=b with singular A
Find solution to Ax=b problem if A is singular. Hint: Compute a minimum norm solution

presque 10 ans il y a

A résolu


Number of elements in matrix
Calculate the # of elements for given matrix

presque 10 ans il y a

A résolu


For given vectors x,y find coresponding spline coefficients.
For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

presque 10 ans il y a

A résolu


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

presque 10 ans il y a

A résolu


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

presque 10 ans il y a

A résolu


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

presque 10 ans il y a

A résolu


Calculate solution of given polynomial
For example, y=function([3 -2 -4]) In here, input vector indicate 3*x^2-2*x-4, y is solution of former equation. y=[1.5...

presque 10 ans il y a

A résolu


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

presque 10 ans il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

presque 10 ans il y a

A résolu


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

presque 10 ans il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

presque 10 ans il y a

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

presque 10 ans il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

presque 10 ans il y a

A résolu


Calculate square and cube of number
Calculate square and cube of number x

presque 10 ans il y a

A résolu


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

presque 10 ans il y a

A résolu


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

presque 10 ans il y a

A résolu


inner product of two vectors
inner product of two vectors

presque 10 ans il y a

A résolu


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

presque 10 ans il y a

A résolu


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

presque 10 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

presque 10 ans il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

presque 10 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

presque 10 ans il y a

A résolu


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

presque 10 ans il y a

A résolu


Add two numbers
Add two numbers (For beginners)

presque 10 ans il y a

Charger plus