A résolu


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

plus de 5 ans il y a

A résolu


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

plus de 5 ans il y a

A résolu


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

plus de 5 ans il y a

A résolu


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

plus de 5 ans il y a

A résolu


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

plus de 5 ans il y a

A résolu


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

plus de 5 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus de 5 ans il y a

A résolu


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

plus de 5 ans il y a

A résolu


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

plus de 5 ans il y a

A résolu


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

plus de 5 ans il y a

A résolu


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

plus de 5 ans il y a

A résolu


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

plus de 5 ans il y a

A résolu


square root
Find the square root (y) of an input (x).

plus de 5 ans il y a

A résolu


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

plus de 5 ans il y a

A résolu


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

plus de 5 ans il y a

A résolu


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

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


Calculate volume of box
Calculate the volume of box,hiven its sides

plus de 5 ans il y a

A résolu


Square root of a number
Write a code that will output the square root of x.

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


find whether it is prime or not
For a given number find if its prime

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


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


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

plus de 5 ans il y a

A résolu


imaginary results
Return the value of the imaginary number i to the power of input argument n.

plus de 5 ans il y a

A résolu


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

plus de 5 ans il y a

A résolu


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Interior angles
Find the sum of interior angles for polygon of x sides.

plus de 5 ans il y a

A résolu


Determine if a row vector has NaN
Determine if a row vector x has NaN

plus de 5 ans il y a

Charger plus