解決済み


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

10年以上 前

解決済み


Indexing the array: Moving values
Assume sampleReadings always contains three elements. * Shift the array contents one position to the left. * The rightmost ...

10年以上 前

解決済み


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

10年以上 前

解決済み


Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

10年以上 前

解決済み


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

10年以上 前

解決済み


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

10年以上 前

解決済み


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

10年以上 前

解決済み


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

10年以上 前

解決済み


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

10年以上 前

解決済み


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

10年以上 前

解決済み


Cody Computer Part 5 - Guess the Name of Cody Computer
Network computers have generally a nickname to be identified. Can you guess the nickname of the Cody Computer? No inpu...

10年以上 前

解決済み


Variable sized row arrays
* Reverse the contents of row array mileMarkers

10年以上 前

解決済み


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

10年以上 前

解決済み


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

10年以上 前

解決済み


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

10年以上 前

解決済み


square number
Square a number

10年以上 前

解決済み


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

10年以上 前

解決済み


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

10年以上 前

解決済み


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

10年以上 前

解決済み


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

10年以上 前

解決済み


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

10年以上 前

解決済み


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

10年以上 前

解決済み


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

10年以上 前

解決済み


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

10年以上 前

解決済み


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

10年以上 前

解決済み


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

10年以上 前

解決済み


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

10年以上 前

解決済み


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

10年以上 前

解決済み


Find Factrorial without using built-in function
A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

10年以上 前

解決済み


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

10年以上 前

さらに読み込む