A résolu


Find the largest number
Given a vector v with 4 elements, find the largest number x. Example: Input: v = [4 7 1 6]; Output: x = 7; You mu...

plus de 7 ans il y a

A résolu


Negative Infinity
Round the given array a towards negative infinity.

plus de 7 ans il y a

A résolu


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

plus de 7 ans il y a

A résolu


Hermite Polynomials
Return the _n_-th <http://en.wikipedia.org/wiki/Hermite_polynomials Hermite polynomial> of the physicists' type. Assume that ...

plus de 7 ans il y a

A résolu


Kepler's Equation
Solve <http://en.wikipedia.org/wiki/Kepler's_equation Kepler's Equation>. Note that the solution is rounded down to 5 decima...

plus de 7 ans il y a

A résolu


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

plus de 7 ans il y a

A résolu


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

plus de 7 ans il y a

A résolu


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

plus de 7 ans il y a

A résolu


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

plus de 7 ans il y a

A résolu


Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

plus de 7 ans il y a

A résolu


vector indexes for a matrix
Matlab allows us to use several indexing styles making code simpler and easier to read than using loops. Vectors can have ve...

plus de 7 ans il y a

A résolu


Non trivial identities - differentiation
Return x by differentiating it.

plus de 7 ans il y a

A résolu


Sort the prime numbers in each row of a 3x3 matrix
Considering a 3x3 matrix A, sort the prime numbers of each row in ascending order. For exemple: input A=[5 8 2 4; ...

plus de 7 ans il y a

A résolu


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

plus de 7 ans il y a

A résolu


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

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

plus de 7 ans il y a

A résolu


Remove the Zero
Given an array n, remove all zeros

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

plus de 7 ans il y a

A résolu


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

plus de 7 ans il y a

A résolu


Volume of Spherical Shell
In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

plus de 7 ans il y a

A résolu


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

plus de 7 ans il y a

A résolu


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

plus de 7 ans il y a

A résolu


Ounces to Kilograms
convert ounces to kilograms, easy

plus de 7 ans il y a

A résolu


How close to a hole
Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

plus de 7 ans il y a

A résolu


Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector. *Input:* A (column vector)...

plus de 7 ans il y a

A résolu


Energy-Mass Equivalence
Given input enegy of the object, E, and constant c = 300,000,000, find the mass of the object.

plus de 7 ans il y a

A résolu


Solve system of equation!
Given provided system of equation, and find x and y. System of equation can be expressed as each term's coefficient. For exam...

plus de 7 ans il y a

Charger plus