A résolu


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

presque 4 ans il y a

A résolu


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

presque 4 ans il y a

A résolu


Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

presque 4 ans il y a

A résolu


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

presque 4 ans il y a

A résolu


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

presque 4 ans il y a

A résolu


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

presque 4 ans il y a

A résolu


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

presque 4 ans il y a

A résolu


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

presque 4 ans il y a

A résolu


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

presque 4 ans il y a

A résolu


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

presque 4 ans il y a

A résolu


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

presque 4 ans il y a

A résolu


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

presque 4 ans il y a

A résolu


Determine the perimeter of a three-quarter circle
If a circle has a diameter of x as an input value, then show the value of the perimeter of the three-quarter circle in output va...

presque 4 ans il y a

A résolu


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

environ 4 ans il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

environ 4 ans il y a

A résolu


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

environ 4 ans il y a

A résolu


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

environ 4 ans il y a

A résolu


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

environ 4 ans il y a

A résolu


Volume of Cylinder
Compute the Circumference of a Cylinder given it's radius and height.Here x is the radius and y is the height

environ 4 ans il y a

A résolu


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

environ 4 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

environ 4 ans il y a

A résolu


Test if a number is numeric or not
Test if a number is numeric or not

environ 4 ans il y a

A résolu


Calculate the logarithm of number
Calculate the logarithm of number x

environ 4 ans il y a

A résolu


calculate the tangent of angle in radians
Calculate the tangent of angle in degrees

environ 4 ans il y a

A résolu


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

environ 4 ans il y a

A résolu


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

environ 4 ans il y a

A résolu


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

Charger plus