Gelöst


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

mehr als 10 Jahre vor

Problem


odd number odd sum
How many three digit numbers are there whose sum of the digits is odd?

mehr als 10 Jahre vor | 0 | 34 Lösungsvorschläge

Problem


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people i...

mehr als 10 Jahre vor | 0 | 16 Lösungsvorschläge

Gelöst


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

mehr als 10 Jahre vor

Gelöst


Declaring a character
* Assign middleInitial with the character T.

mehr als 10 Jahre vor

Gelöst


Why?
Why has been a major question throughout history; why did Napoleon fail, why do we exist, why must I work a pageant, to name a f...

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

mehr als 10 Jahre vor

Gelöst


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

mehr als 10 Jahre vor

Gelöst


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

mehr als 10 Jahre vor

Gelöst


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

mehr als 10 Jahre vor

Gelöst


Box!
Given a box, find the volume of the cube. With each side = a.

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

mehr als 10 Jahre vor

Gelöst


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


Vector
Create a 1 x 10 vector from 1 to 20 with increments of 2

mehr als 10 Jahre vor

Gelöst


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

mehr als 10 Jahre vor

Gelöst


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

mehr als 10 Jahre vor

Gelöst


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

mehr als 10 Jahre vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

mehr als 10 Jahre vor

Gelöst


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

mehr als 10 Jahre vor

Gelöst


ascii value
let input='a' output=97

mehr als 10 Jahre vor

Gelöst


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

mehr als 10 Jahre vor

Gelöst


Create a vector
Create a vector from 0 to n by intervals of 2.

mehr als 10 Jahre vor

Gelöst


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

mehr als 10 Jahre vor

Mehr laden