Resuelto


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

casi 10 años hace

Resuelto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

casi 10 años hace

Resuelto


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

casi 10 años hace

Resuelto


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

casi 10 años hace

Resuelto


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

casi 10 años hace

Resuelto


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...

casi 10 años hace

Resuelto


Complex number
For complex number c=a+bi, write code that will add a and b together.

casi 10 años hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

casi 10 años hace

Resuelto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

casi 10 años hace

Resuelto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

casi 10 años hace

Resuelto


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

casi 10 años hace

Resuelto


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

casi 10 años hace

Resuelto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

casi 10 años hace

Resuelto


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

casi 10 años hace

Resuelto


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

casi 10 años hace

Resuelto


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

casi 10 años hace

Resuelto


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

casi 10 años hace

Resuelto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

casi 10 años hace

Resuelto


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

casi 10 años hace

Resuelto


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

casi 10 años hace

Resuelto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

casi 10 años hace

Resuelto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

casi 10 años hace

Resuelto


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

casi 10 años hace

Resuelto


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

casi 10 años hace

Resuelto


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

casi 10 años hace

Resuelto


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

casi 10 años hace

Resuelto


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

casi 10 años hace

Resuelto


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

casi 10 años hace

Cargar más